export default function DashboardLayout({ children }) {
const router = useRouter()
const dashboard_id = router.query.dashboardId
const dashboardQuery = useDashboard({ dashboard_id })
const renderNav = () => {
<div>
<span>{dashboardQuery.data.title}</span>
<Link passHref href={'/dashboard/${dashboard_id}/location-1'}><span>Location1</span></Link>
<Link passHref href={'/dashboard/${dashboard_id}/location-2'}><span>Location2</span></Link>
</div>
}
return (
<div>
{renderNav()}
{children}
</div>
)
}
export default function DashboardLayout({ children }) {
const router = useRouter()
const dashboard_id = router.query.dashboardId
const dashboardQuery = useDashboard({ dashboard_id })
const renderNav = () => {
<div>
<span>{dashboardQuery.data.title}</span>
<Link passHref href={'/dashboard/${dashboard_id}/location-1'}><span>Location1</span></Link>
<Link passHref href={'/dashboard/${dashboard_id}/location-2'}><span>Location2</span></Link>
</div>
}
return (
<div>
{renderNav()}
{children}
</div>
)
}