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.
12 lines
310 B
TypeScript
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);
|
|
}
|