mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-05-05 12:44:38 +00:00
refactor: remove debug log and improve button layout in SupabaseConnection
Remove console.log statement for debugging purposes in the API route and enhance the layout of buttons in the SupabaseConnection component by grouping them and adding a refresh button
This commit is contained in:
parent
bc9948062e
commit
418fbf13e0
@ -214,13 +214,23 @@ export function SupabaseConnection() {
|
||||
)}
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
onClick={() => handleCreateProject()}
|
||||
className="px-2 py-1 rounded-md text-xs bg-[#3ECF8E] text-white hover:bg-[#3BBF84] flex items-center gap-1"
|
||||
>
|
||||
<div className="i-ph:plus w-3 h-3" />
|
||||
New Project
|
||||
</button>
|
||||
<div className="flex items-center gap-2">
|
||||
<button
|
||||
onClick={() => fetchSupabaseStats(supabaseConn.token)}
|
||||
className="px-2 py-1 rounded-md text-xs bg-[#F0F0F0] dark:bg-[#252525] text-bolt-elements-textSecondary hover:bg-[#E5E5E5] dark:hover:bg-[#333333] flex items-center gap-1"
|
||||
title="Refresh projects list"
|
||||
>
|
||||
<div className="i-ph:arrows-clockwise w-3 h-3" />
|
||||
Refresh
|
||||
</button>
|
||||
<button
|
||||
onClick={() => handleCreateProject()}
|
||||
className="px-2 py-1 rounded-md text-xs bg-[#3ECF8E] text-white hover:bg-[#3BBF84] flex items-center gap-1"
|
||||
>
|
||||
<div className="i-ph:plus w-3 h-3" />
|
||||
New Project
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{isProjectsExpanded && (
|
||||
|
@ -34,11 +34,6 @@ export const action: ActionFunction = async ({ request }) => {
|
||||
}
|
||||
}
|
||||
|
||||
console.log(
|
||||
'Unique projects:',
|
||||
Array.from(uniqueProjectsMap.values()).map((p) => ({ id: p.id, name: p.name })),
|
||||
);
|
||||
|
||||
const uniqueProjects = Array.from(uniqueProjectsMap.values());
|
||||
|
||||
uniqueProjects.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime());
|
||||
|
Loading…
Reference in New Issue
Block a user