File tree 1 file changed +33
-0
lines changed
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ 'use client' ;
2
+ import { useUserProfile } from '@/hooks/use-user-profile' ;
3
+ import { ProfileCard } from '@/components/profile/profile-card' ;
4
+ import { ProfileEditor } from '@/components/profile/profile-editor' ;
5
+ import { ArrowLeft } from 'lucide-react' ;
6
+ import { useState , useEffect } from 'react' ;
7
+ import Link from 'next/link' ;
8
+
9
+ function ProfilePage ( ) {
10
+ const { user, updateProfile } = useUserProfile ( ) ;
11
+ const [ isClient , setIsClient ] = useState ( false ) ;
12
+
13
+ useEffect ( ( ) => {
14
+ setIsClient ( true ) ;
15
+ } , [ ] ) ;
16
+
17
+ if ( ! isClient ) {
18
+ return null ;
19
+ }
20
+
21
+ return (
22
+ < div className = "space-y-4 flex flex-col mx-36 my-12" >
23
+ < Link href = { '/' } >
24
+ < ArrowLeft />
25
+ </ Link >
26
+
27
+ < ProfileCard user = { user } />
28
+ < ProfileEditor user = { user } onUpdate = { updateProfile } />
29
+ </ div >
30
+ ) ;
31
+ }
32
+
33
+ export default ProfilePage ;
You can’t perform that action at this time.
0 commit comments