From 50a33323936864d8a2d6940c000cd5af1b7f26c9 Mon Sep 17 00:00:00 2001 From: Orest Hazda Date: Mon, 12 Feb 2024 23:06:51 -0500 Subject: [PATCH] chore: delete supabase call --- src/app/components/HelpPage.tsx | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/app/components/HelpPage.tsx b/src/app/components/HelpPage.tsx index 7acb304..266766a 100644 --- a/src/app/components/HelpPage.tsx +++ b/src/app/components/HelpPage.tsx @@ -2,18 +2,21 @@ import React, { useState } from 'react'; import ReactMarkdown from 'react-markdown'; const aksAi = async (query: string) => { - return fetch( - 'https://riuhfaprzoechxritfub.functions.supabase.co/cds-search', - { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Authorization: - 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJpdWhmYXByem9lY2h4cml0ZnViIiwicm9sZSI6ImFub24iLCJpYXQiOjE2ODM1NjQ0MjQsImV4cCI6MTk5OTE0MDQyNH0.981A7UGwLKvfowemqZJ6mDR5Iubt467ukOOopH4MBTk', - }, - body: JSON.stringify({ query }), - } - ).then((res) => res.json()); + return new Promise<{ data: any }>((resolve, reject) => { + setTimeout(() => { + resolve({ + data: { + choices: [ + { + message: { + content: `I'm sorry, I don't have an answer for that question. 😔`, + }, + }, + ], + }, + }); + }, 2000); + }); }; export default function HelpPage() {