Function
getQueryBasedOnLogin
(
isTokenValid: boolean,
user: LoggedUser | null,
query: string,
queryIfLogged: string | null,
)
Source from the content-addressed store, hash-verified
| 352 | } |
| 353 | |
| 354 | const 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 |
Tested by
no test coverage detected