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:
@@ -214,6 +214,15 @@ export function SupabaseConnection() {
|
||||
)}
|
||||
/>
|
||||
</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"
|
||||
@@ -222,6 +231,7 @@ export function SupabaseConnection() {
|
||||
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());
|
||||
|
||||
Reference in New Issue
Block a user