22 lines
559 B
TypeScript
22 lines
559 B
TypeScript
import { ReactNode } from 'react';
|
|
import { BaseProviders } from './base-providers';
|
|
|
|
interface RootLayoutProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
/**
|
|
* RootLayout is the stable outermost wrapper for all Inertia pages.
|
|
* It ensures that global providers (Brand, Sidebar, etc.) remain mounted
|
|
* during page transitions, preventing state resets (like the Green Theme flicker).
|
|
*/
|
|
export function RootLayout({ children }: RootLayoutProps) {
|
|
return (
|
|
<BaseProviders>
|
|
{children}
|
|
</BaseProviders>
|
|
);
|
|
}
|
|
|
|
export default RootLayout;
|