Show currently active key in settings (#542)
This commit is contained in:
@@ -14,10 +14,13 @@ import {
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { envCredential } from "@/util/env";
|
||||
import { HiddenCopyableInput } from "@/components/ui/hidden-copyable-input";
|
||||
|
||||
function Settings() {
|
||||
const { environment, organization, setEnvironment, setOrganization } =
|
||||
useSettingsStore();
|
||||
const apiKey = envCredential;
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-8">
|
||||
@@ -55,6 +58,15 @@ function Settings() {
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
<Card>
|
||||
<CardHeader className="border-b-2">
|
||||
<CardTitle className="text-lg">API Key</CardTitle>
|
||||
<CardDescription>Currently active API key</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="p-8">
|
||||
<HiddenCopyableInput value={apiKey ?? "API key not found"} />
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user