All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m41s
- zoneView: an eventId always shows the timeline; the back-to-albums button is hidden then. - buildAlbums: null/non-object inputs and replies are skipped, non-numeric timestamps count as 0, an empty-body root is titled "Untitled album", m.replace events are never files or albums. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
5 lines
298 B
TypeScript
5 lines
298 B
TypeScript
export type ZoneView = 'albums' | 'timeline';
|
|
|
|
/** The view a file-zone room shows. A link to an event always wins; else the user's choice; else albums. */
|
|
export const zoneView = (choice: ZoneView | undefined, eventId: string | undefined): ZoneView =>
|
|
eventId ? 'timeline' : choice ?? 'albums';
|