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