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

Function getQueryBasedOnLogin

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

Source from the content-addressed store, hash-verified

352}
353
354const getQueryBasedOnLogin = (
355 isTokenValid: boolean,
356 user: LoggedUser | null,
357 query: string,
358 queryIfLogged: string | null,
359): string | null => {
360 if (isTokenValid) {
361 if (user && queryIfLogged) {
362 return queryIfLogged;
363 }
364 return query;
365 }
366 return null;
367};
368
369// The feed's own width: full width normally, and clamped + centered to the
370// 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