MCPcopy Create free account
hub / github.com/dailydotdev/apps / getLayout

Function getLayout

packages/webapp/components/layouts/MainLayout.tsx:9–22  ·  view source on GitHub ↗
(
  page: ReactNode,
  pageProps?: Record<string, unknown>,
  layoutProps?: MainLayoutProps,
)

Source from the content-addressed store, hash-verified

7export default MainLayout;
8
9export const getLayout = (
10 page: ReactNode,
11 pageProps?: Record<string, unknown>,
12 layoutProps?: MainLayoutProps,
13): ReactNode => {
14 // @NOTE see https://dailydotdev.atlassian.net/l/cp/dK9h1zoM
15 // eslint-disable-next-line react-hooks/rules-of-hooks
16 const router = useRouter();
17 return (
18 <MainLayout {...layoutProps} activePage={router?.asPath}>
19 {page}
20 </MainLayout>
21 );
22};

Callers 15

getPageLayoutFunction · 0.90
getNotificationsLayoutFunction · 0.90
getWalletLayoutFunction · 0.90
[id].tsxFile · 0.90
getPageLayoutFunction · 0.90
getPageLayoutFunction · 0.90
getPageLayoutFunction · 0.90
geOpportunityLayoutFunction · 0.90
getGivebackLayoutFunction · 0.90
getHackathonLayoutFunction · 0.90
getDailyQuestsLayoutFunction · 0.90
getHighlightsLayoutFunction · 0.90

Calls 1

useRouterFunction · 0.50

Tested by

no test coverage detected