From 780bb3af7e8d36ff11dfa12a3c298770f17bb515 Mon Sep 17 00:00:00 2001
From: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
Date: Mon, 16 Dec 2024 14:52:56 -0500
Subject: [PATCH] fix(ui): Update colors to match brand kit
---
www/app/Chat.tsx | 73 +++++++++----------
www/app/actions/conversations.ts | 3 -
www/app/auth/page.tsx | 17 ++---
www/app/globals.css | 12 ++-
www/app/page.tsx | 2 +-
www/app/providers.tsx | 2 +-
www/app/settings/SettingsLayout.tsx | 4 +-
www/components/auth/forgot.tsx | 13 ++--
www/components/auth/signIn.tsx | 32 +++-----
www/components/auth/signUp.tsx | 61 ++++------------
www/components/conversationtab.tsx | 2 +-
www/components/cookieConsentBanner.tsx | 12 +--
www/components/header.tsx | 4 +-
www/components/messagebox.tsx | 12 ++-
www/components/settings/SettingsForm.tsx | 6 +-
.../settings/SubscriptionSettings.tsx | 7 +-
www/components/sidebar.tsx | 7 +-
www/utils/swrCache.ts | 7 +-
18 files changed, 118 insertions(+), 158 deletions(-)
diff --git a/www/app/Chat.tsx b/www/app/Chat.tsx
index f4aa79a..9600fba 100644
--- a/www/app/Chat.tsx
+++ b/www/app/Chat.tsx
@@ -158,18 +158,18 @@ export default function Chat({
const conversationsKey = useMemo(() => userId, [userId]);
-const { data: conversations, mutate: mutateConversations } = useSWR(
- conversationsKey,
- conversationsFetcher,
- {
- fallbackData: initialConversations,
- provider: localStorageProvider,
- revalidateOnFocus: false,
- dedupingInterval: 60000,
- revalidateIfStale: false,
- revalidateOnMount: false,
- }
-);
+ const { data: conversations, mutate: mutateConversations } = useSWR(
+ conversationsKey,
+ conversationsFetcher,
+ {
+ fallbackData: initialConversations,
+ provider: localStorageProvider,
+ revalidateOnFocus: false,
+ dedupingInterval: 60000,
+ revalidateIfStale: false,
+ revalidateOnMount: false,
+ }
+ );
const messagesFetcher = async (conversationId: string) => {
if (!userId) return Promise.resolve([]);
@@ -179,31 +179,27 @@ const { data: conversations, mutate: mutateConversations } = useSWR(
return getMessages(conversationId);
};
- const messagesKey = useMemo(() =>
- conversationId ? ['messages', conversationId] : null,
+ const messagesKey = useMemo(
+ () => (conversationId ? ['messages', conversationId] : null),
[conversationId]
);
-
+
const {
data: messages,
mutate: mutateMessages,
isLoading: messagesLoading,
- } = useSWR(
- messagesKey,
- () => messagesFetcher(conversationId!),
- {
- fallbackData: initialMessages,
- provider: localStorageProvider,
- revalidateOnFocus: false,
- revalidateOnReconnect: false,
- dedupingInterval: 60000,
- onSuccess: (data) => {
- if (conversationId?.startsWith('temp-')) {
- mutateMessages([], false);
- }
+ } = useSWR(messagesKey, () => messagesFetcher(conversationId!), {
+ fallbackData: initialMessages,
+ provider: localStorageProvider,
+ revalidateOnFocus: false,
+ revalidateOnReconnect: false,
+ dedupingInterval: 60000,
+ onSuccess: (data) => {
+ if (conversationId?.startsWith('temp-')) {
+ mutateMessages([], false);
}
- }
- );
+ },
+ });
const handleReactionAdded = async (messageId: string, reaction: Reaction) => {
if (!userId || !conversationId) return;
@@ -321,7 +317,7 @@ const { data: conversations, mutate: mutateConversations } = useSWR(
honchoResponse
).json()) as HonchoResponse;
- const pureThought = thoughtText
+ const pureThought = thoughtText;
thoughtText +=
'\n\nHoncho Dialectic Response:\n\n' + honchoContent.content;
@@ -454,7 +450,7 @@ const { data: conversations, mutate: mutateConversations } = useSWR(
)}
-
+
{
@@ -528,14 +525,14 @@ const { data: conversations, mutate: mutateConversations } = useSWR(
}}
/>