Skip to content

Commit 7f9679b

Browse files
committed
fix:(Fixed on Supabase integration for chatbot AI)
1 parent 54a8a42 commit 7f9679b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/ui/chats.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ export default function Chats({ author }: ChatProp) {
143143
async function loadMessagesFromSupabase() {
144144
try {
145145
const { data, error } = await supabase
146-
.from("bot_chat_messages")
146+
.from("bot_user_messages")
147147
.select("*")
148-
.eq("author", author)
148+
.eq("author", author.name)
149149
.order("timestamp", { ascending: true });
150150

151151
if (error) throw error;
@@ -159,7 +159,7 @@ export default function Chats({ author }: ChatProp) {
159159
}
160160

161161
loadMessagesFromSupabase();
162-
}, [author]);
162+
}, [author.name]);
163163

164164
return (
165165
<div className="flex min-h-[100dvh] bg-[#1a1a1a] text-white">

0 commit comments

Comments
 (0)