import { Outlet, useNavigation } from "react-router";
import { HydrateFallback } from "../HydrateFallback";
import { MenuButtons } from "../MenuButtons";

export function BaseLayout() {
  const navigation = useNavigation();
  const loading = navigation.state === 'loading';
  return loading ? <HydrateFallback /> : (<>
    <Outlet />
    <MenuButtons />
  </>);
}
