Skip to content

Commit 433040c

Browse files
authored
Merge pull request #37 from unicef/feat/hide-api-key-bar-when-set
Hide API key bar when key is already set
2 parents a706408 + a624920 commit 433040c

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

apps/studio/src/routes/__root.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@ function RootLayout() {
1515

1616
return (
1717
<div className="flex flex-col h-screen bg-background text-foreground">
18-
<div className="flex items-center justify-end px-3 py-1 border-b">
19-
<Button
20-
variant="ghost"
21-
size="icon"
22-
className="h-8 w-8"
23-
onClick={() => setShowKeyDialog(true)}
24-
title="API Key Settings"
25-
>
26-
<KeyRound className="h-4 w-4" />
27-
<span className="sr-only">API Key Settings</span>
28-
</Button>
29-
</div>
18+
{!hasApiKey && (
19+
<div className="flex items-center justify-end px-3 py-1 border-b">
20+
<Button
21+
variant="ghost"
22+
size="icon"
23+
className="h-8 w-8"
24+
onClick={() => setShowKeyDialog(true)}
25+
title="API Key Settings"
26+
>
27+
<KeyRound className="h-4 w-4" />
28+
<span className="sr-only">API Key Settings</span>
29+
</Button>
30+
</div>
31+
)}
3032

3133
<main className="flex-1 min-h-0 flex flex-col overflow-hidden">
3234
<Outlet />

0 commit comments

Comments
 (0)