File tree Expand file tree Collapse file tree
packages/swingset/src/app/(clerk) Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import {
1919} from '@/components/ui/sidebar' ;
2020
2121const flows = [
22+ { title : 'Connected accounts' , href : '/live/connected-accounts' } ,
2223 { title : 'Delete account' , href : '/live/delete-account' } ,
2324 { title : 'Reverification' , href : '/live/reverification' } ,
2425] ;
Original file line number Diff line number Diff line change 1+ 'use client' ;
2+
3+ import { UserProfileConnectedAccountsSection } from '@clerk/mosaic/features/user-profile/user-profile-connected-accounts-section/user-profile-connected-accounts-section' ;
4+ import { MosaicProvider } from '@clerk/mosaic/MosaicProvider' ;
5+ import { useUser } from '@clerk/nextjs' ;
6+ import Link from 'next/link' ;
7+
8+ export default function ConnectedAccountsLivePage ( ) {
9+ const { isLoaded, isSignedIn } = useUser ( ) ;
10+
11+ return (
12+ < MosaicProvider >
13+ < div className = 'mx-auto flex w-full max-w-3xl flex-col gap-6 p-3 sm:p-8' >
14+ < div className = 'flex flex-col gap-1' >
15+ < h1 className = 'text-xl font-semibold' > Connected accounts</ h1 >
16+ < p className = 'text-muted-foreground text-sm' >
17+ Connects, reconnects, and removes the signed-in user's social accounts. The section stays hidden when
18+ no social provider is enabled.
19+ </ p >
20+ </ div >
21+ { ! isLoaded ? < p className = 'text-muted-foreground text-sm' > Loading…</ p > : null }
22+ { isLoaded && ! isSignedIn ? (
23+ < p className = 'text-muted-foreground text-sm' >
24+ < Link
25+ href = '/sign-in'
26+ className = 'text-foreground underline underline-offset-4'
27+ >
28+ Sign in
29+ </ Link > { ' ' }
30+ to manage connected accounts.
31+ </ p >
32+ ) : null }
33+ { isLoaded && isSignedIn ? < UserProfileConnectedAccountsSection /> : null }
34+ </ div >
35+ </ MosaicProvider >
36+ ) ;
37+ }
You can’t perform that action at this time.
0 commit comments