File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,8 @@ export const Sidebar: React.FC<SidebarProps> = ({
6767 } ;
6868
6969 const handleDeleteChat = async ( chatId : string ) => {
70- await deleteProject ( chatId ) ;
70+ const supabase = createBrowserClient ( ) ;
71+ await deleteProject ( supabase , chatId ) ;
7172 setChatHistory ( chatHistory . filter ( chat => chat . id !== chatId ) ) ;
7273 } ;
7374
@@ -119,7 +120,7 @@ export const Sidebar: React.FC<SidebarProps> = ({
119120 }
120121
121122 const fetchChatHistory = async ( ) => {
122- const projects = await getProjects ( ) ;
123+ const projects = await getProjects ( supabase ) ;
123124 const history = projects . map ( ( project : Project ) => ( {
124125 id : project . id ,
125126 title : project . title ,
@@ -440,4 +441,4 @@ export const Sidebar: React.FC<SidebarProps> = ({
440441 < PricingModal isOpen = { isPricingModalOpen } onClose = { ( ) => setIsPricingModalOpen ( false ) } />
441442 </ div >
442443 ) ;
443- } ;
444+ } ;
You can’t perform that action at this time.
0 commit comments