Files
cinny/src/app/components/BackRouteHandler.tsx
Max Litruv Boonzaayer 9c7f71896c fix: rework compact nav and centralized back routing
Use master-detail layout on skinny windows so server and channel lists share one screen, with back returning to the space list instead of redirect loops. Add useBackRoute for title-bar and page-header back buttons with view transitions.
2026-07-09 04:22:07 +10:00

12 lines
310 B
TypeScript

import { ReactNode } from 'react';
import { useBackRoute } from '../hooks/useBackRoute';
type BackRouteHandlerProps = {
children: (onBack: () => void) => ReactNode;
};
export function BackRouteHandler({ children }: BackRouteHandlerProps) {
const { goBack } = useBackRoute();
return children(goBack);
}