index.tsx raw
1 import Profile from '@/components/Profile'
2 import { useFetchProfile } from '@/hooks'
3 import SecondaryPageLayout from '@/layouts/SecondaryPageLayout'
4 import { forwardRef } from 'react'
5
6 const ProfilePage = forwardRef(({ id, index }: { id?: string; index?: number }, ref) => {
7 const { profile } = useFetchProfile(id)
8
9 return (
10 <SecondaryPageLayout index={index} title={profile?.username} displayScrollToTopButton ref={ref}>
11 <Profile id={id} />
12 </SecondaryPageLayout>
13 )
14 })
15 ProfilePage.displayName = 'ProfilePage'
16 export default ProfilePage
17