From f82475118eb44a67400fc6ab36aecff260f8195c Mon Sep 17 00:00:00 2001 From: Ayyub Ibrahim Date: Thu, 2 May 2024 17:40:53 -0500 Subject: [PATCH 1/2] fixed spacing in response; added preview to card --- packages/web/components/Card/BetaCard.tsx | 4 +- .../components/HomeResults/QueryResult.tsx | 40 ++++++++++--------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/packages/web/components/Card/BetaCard.tsx b/packages/web/components/Card/BetaCard.tsx index e931247..52a7e73 100644 --- a/packages/web/components/Card/BetaCard.tsx +++ b/packages/web/components/Card/BetaCard.tsx @@ -123,8 +123,8 @@ const BetaCard = ({ card }: { card: ICard }) => { {/* Combined Card Responses */} -

{combinedResponses}

- +
{combinedResponses}
+
{isYouTubeURL(thumbnail?.source_url) && ( + )} + ) : (

)} - - {isYouTubeURL(thumbnail?.source_url) && ( - - )}

); @@ -151,4 +155,4 @@ export default function QueryResult({ card }: { card: ICard }) { ); -} +} \ No newline at end of file From 1f3f418b741dc239b99ed83b5f169f21c2d61965 Mon Sep 17 00:00:00 2001 From: Ayyub Ibrahim Date: Thu, 2 May 2024 18:04:39 -0500 Subject: [PATCH 2/2] adjusted color scheme; improved style of alert box --- .../app/custom-css/1-helpers/_variables.scss | 2 +- packages/web/components/Alerts/SignUp.tsx | 17 +++-- .../components/Alerts/alertsignup.module.scss | 73 ++++++++++--------- packages/web/components/Card/BetaCard.tsx | 6 +- .../web/components/HomeBanner/NewQuery.tsx | 4 +- .../components/HomeResults/QueryResult.tsx | 46 ++++++------ 6 files changed, 81 insertions(+), 67 deletions(-) diff --git a/packages/web/app/custom-css/1-helpers/_variables.scss b/packages/web/app/custom-css/1-helpers/_variables.scss index 3c96e67..574752a 100644 --- a/packages/web/app/custom-css/1-helpers/_variables.scss +++ b/packages/web/app/custom-css/1-helpers/_variables.scss @@ -29,7 +29,7 @@ $xl: 82.5rem; // Colors $primary: #2c2c2c; $altPrimary: #e1e1da; -$secondary: #f35610; +$secondary: #6b93c3; $altSecondary: #6b93c3; // Gradients diff --git a/packages/web/components/Alerts/SignUp.tsx b/packages/web/components/Alerts/SignUp.tsx index 8e40249..7035eeb 100644 --- a/packages/web/components/Alerts/SignUp.tsx +++ b/packages/web/components/Alerts/SignUp.tsx @@ -1,8 +1,8 @@ "use client"; -import { useEffect, useRef, useState } from "react"; -import styles from "./alertsignup.module.scss"; import { TABLES } from "@/lib/supabase/db"; import { supabase } from "@/lib/supabase/supabaseClient"; +import { useEffect, useRef, useState } from "react"; +import styles from "./alertsignup.module.scss"; interface AlertSignUpProps { onSignUpComplete: () => void; @@ -27,10 +27,9 @@ export default function AlertSignUp({ onSignUpComplete }: AlertSignUpProps) { const handleSubscription = async (email: string) => { try { - const { data, error } = await supabase.from(TABLES.ALERTS).insert([ - { email: email, topics: "" }, - ]); - + const { data, error } = await supabase + .from(TABLES.ALERTS) + .insert([{ email: email, topics: "" }]); if (error) { console.error("Error inserting subscription", error.message); setSuccessMessage(`Error: ${error.message}. Please try again.`); @@ -54,7 +53,10 @@ export default function AlertSignUp({ onSignUpComplete }: AlertSignUpProps) { return (
- + setEmail(e.target.value)} placeholder="Enter your email" required + className={styles["input"]} />
{/* Combined Card Responses */} -
{combinedResponses}
- +
+ {combinedResponses} +
+
{isYouTubeURL(thumbnail?.source_url) && (