// code-smell-ok(boundary): 라우트 에러는 router의 errorElement(RouteError)가 잡는다
import { NuqsAdapter } from 'nuqs/adapters/react-router/v8';
import { Suspense } from 'react';
import { Outlet } from 'react-router';

export const RootLayout = () => {
  return (
    <NuqsAdapter>
      <Suspense fallback={<RouteFallback />}>
        <Outlet />
      </Suspense>
    </NuqsAdapter>
  );
};

const RouteFallback = () => {
  return (
    <div className="flex min-h-dvh items-center justify-center text-sm text-muted-foreground">
      불러오는 중…
    </div>
  );
};
