mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-14 05:15:19 +00:00
36 lines
No EOL
1 KiB
TypeScript
36 lines
No EOL
1 KiB
TypeScript
import { getSecrets } from "@/actions";
|
|
import { SecretsList } from "./components/secretsList";
|
|
import { isServiceError } from "@/lib/utils";
|
|
import { ImportSecretCard } from "./components/importSecretCard";
|
|
import { ServiceErrorException } from "@/lib/serviceError";
|
|
|
|
interface SecretsPageProps {
|
|
params: Promise<{
|
|
domain: string;
|
|
}>
|
|
}
|
|
|
|
export default async function SecretsPage(props: SecretsPageProps) {
|
|
const params = await props.params;
|
|
|
|
const {
|
|
domain
|
|
} = params;
|
|
|
|
const secrets = await getSecrets(domain);
|
|
if (isServiceError(secrets)) {
|
|
throw new ServiceErrorException(secrets);
|
|
}
|
|
|
|
return (
|
|
<div className="flex flex-col gap-6">
|
|
<div>
|
|
<h3 className="text-lg font-medium">Manage Secrets</h3>
|
|
<p className="text-sm text-muted-foreground">These secrets grant Sourcebot access to private code.</p>
|
|
</div>
|
|
|
|
<SecretsList secrets={secrets} />
|
|
<ImportSecretCard className="mt-4" />
|
|
</div>
|
|
)
|
|
} |