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

Function getFeedPageLayoutComponent

packages/shared/src/hooks/useFeedLayout.ts:94–108  ·  view source on GitHub ↗
({
  shouldUseListFeedLayoutOnMobileTablet,
  shouldUseListMode,
  isSearchPageLaptop,
}: GetFeedPageLayoutComponentProps)

Source from the content-addressed store, hash-verified

92}
93
94const getFeedPageLayoutComponent = ({
95 shouldUseListFeedLayoutOnMobileTablet,
96 shouldUseListMode,
97 isSearchPageLaptop,
98}: GetFeedPageLayoutComponentProps): UseFeedLayoutReturn['FeedPageLayoutComponent'] => {
99 if (shouldUseListMode && !isSearchPageLaptop) {
100 return FeedPageLayoutList;
101 }
102
103 if (shouldUseListFeedLayoutOnMobileTablet) {
104 return FeedPageLayoutMobile;
105 }
106
107 return FeedPage;
108};
109
110export const useFeedLayout = ({
111 feedRelated = true,

Callers 1

useFeedLayoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected