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

Function getLayout

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

Source from the content-addressed store, hash-verified

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

Callers 8

getMainFeedLayoutFunction · 0.90
getBookmarkFeedLayoutFunction · 0.90
getFeedByIdsLayoutFunction · 0.90
InternalAppFunction · 0.50
GetPageLayoutFunction · 0.50
GetPageLayoutFunction · 0.50
GetPageLayoutFunction · 0.50
GetPageLayoutFunction · 0.50

Calls 1

useRouterFunction · 0.50

Tested by

no test coverage detected