/** * Layout for a single recollection: shared menubar and flipping card (Logos front / Flux back). */ import React, { useEffect } from 'react' import { Link, useParams } from 'react-router-dom' import { usePlatform } from '@/app/kosmos/KosmosContext' import { RecollectionMenubarProvider } from './RecollectionMenubarContext' import { RecollectionActionsProvider } from './RecollectionActionsContext' import { RecollectionTitleContent } from './RecollectionTitleContent' import { RecollectionMenubar } from './RecollectionMenubar' import { RecollectionViewSwitcher } from './RecollectionViewSwitcher' import { FlippingCardView } from './FlippingCardView' export function RecollectionLayout() { const { recollectionId } = useParams<{ recollectionId: string }>() const { recollections, recordRecollectionAccess } = usePlatform() useEffect(() => { if (recollectionId) recordRecollectionAccess(recollectionId) }, [recollectionId, recordRecollectionAccess]) const recollection = recollectionId ? recollections.find((p) => p.id === recollectionId) : null if (!recollectionId) return null if (!recollection) { return (

Recollection not found.

Back to recollections
) } return (
) }