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

Function getQueryBasedOnLogin

packages/shared/src/components/MainFeedLayout.tsx:261–274  ·  view source on GitHub ↗
(
  isTokenValid: boolean,
  user: LoggedUser | null,
  query: string,
  queryIfLogged: string | null,
)

Source from the content-addressed store, hash-verified

259}
260
261const getQueryBasedOnLogin = (
262 isTokenValid: boolean,
263 user: LoggedUser | null,
264 query: string,
265 queryIfLogged: string | null,
266): string | null => {
267 if (isTokenValid) {
268 if (user && queryIfLogged) {
269 return queryIfLogged;
270 }
271 return query;
272 }
273 return null;
274};
275
276// The feed's own width: full width normally, and clamped + centered to the
277// same card-based max-width as the grid on wide screens (desktopL). The CSS

Callers 1

MainFeedLayoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected