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

Function getQueryBasedOnLogin

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

Source from the content-addressed store, hash-verified

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