mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 11:55:05 +03:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
28 lines
685 B
TypeScript
28 lines
685 B
TypeScript
import { useRouter } from 'next/router'
|
|
import { PropsWithChildren } from 'react'
|
|
|
|
import { ProjectLayout } from '../ProjectLayout'
|
|
import { AdvisorsSidebarMenu } from './AdvisorsSidebarMenu'
|
|
import { withAuth } from '@/hooks/misc/withAuth'
|
|
|
|
export interface AdvisorsLayoutProps {
|
|
title?: string
|
|
}
|
|
|
|
const AdvisorsLayout = ({ children }: PropsWithChildren<AdvisorsLayoutProps>) => {
|
|
const router = useRouter()
|
|
const page = router.pathname.split('/')[4]
|
|
|
|
return (
|
|
<ProjectLayout
|
|
isLoading={false}
|
|
product="Advisors"
|
|
productMenu={<AdvisorsSidebarMenu page={page} />}
|
|
>
|
|
{children}
|
|
</ProjectLayout>
|
|
)
|
|
}
|
|
|
|
export default withAuth(AdvisorsLayout)
|