Skip to content

Commit 3c5246a

Browse files
committed
sso
1 parent 2030b30 commit 3c5246a

File tree

30 files changed

+4430
-14
lines changed

30 files changed

+4430
-14
lines changed

.cursor/rules/01-MUST-DO.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ use json.stringify() when adding debugging
4646

4747
Almost NEVER use useEffect unless it's critical
4848

49-
do NOT use types any, unknown or never, use proper explicit types, check the @shared/types folder for types, and use them in the codebase, or create ones if needed, don't define types in the same file as the component, create a new file in the @shared/types folder for the type
49+
do NOT use types any, unknown or never, use proper explicit types
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
"use client";
2+
3+
import { FingerprintIcon } from "@phosphor-icons/react";
4+
import { Suspense } from "react";
5+
import { EmptyState } from "@/components/empty-state";
6+
import { Skeleton } from "@/components/ui/skeleton";
7+
import { useOrganizations } from "@/hooks/use-organizations";
8+
import { SSOSettings } from "./sso-settings";
9+
10+
function SkeletonRow() {
11+
return (
12+
<div className="grid grid-cols-[auto_1fr_auto] items-center gap-4 px-5 py-4">
13+
<Skeleton className="h-10 w-10 rounded" />
14+
<div className="space-y-2">
15+
<Skeleton className="h-4 w-32" />
16+
<Skeleton className="h-3 w-48" />
17+
</div>
18+
<Skeleton className="h-6 w-16 rounded-full" />
19+
</div>
20+
);
21+
}
22+
23+
function PageSkeleton() {
24+
return (
25+
<div className="h-full lg:grid lg:grid-cols-[1fr_18rem]">
26+
<div className="divide-y border-b lg:border-b-0">
27+
<SkeletonRow />
28+
<SkeletonRow />
29+
</div>
30+
<div className="space-y-4 bg-card p-5">
31+
<Skeleton className="h-10 w-full" />
32+
<Skeleton className="h-18 w-full rounded" />
33+
<Skeleton className="h-10 w-full" />
34+
<Skeleton className="h-20 w-full rounded" />
35+
</div>
36+
</div>
37+
);
38+
}
39+
40+
export default function SSOSettingsPage() {
41+
const { activeOrganization, isLoading } = useOrganizations();
42+
43+
if (isLoading) {
44+
return <PageSkeleton />;
45+
}
46+
47+
if (!activeOrganization) {
48+
return (
49+
<EmptyState
50+
description="Select or create an organization to configure SSO settings"
51+
icon={<FingerprintIcon weight="duotone" />}
52+
title="No organization selected"
53+
/>
54+
);
55+
}
56+
57+
return (
58+
<Suspense fallback={<PageSkeleton />}>
59+
<SSOSettings organization={activeOrganization} />
60+
</Suspense>
61+
);
62+
}

0 commit comments

Comments
 (0)