RM / src /components /templates /index.ts
trretretret's picture
Initial commit: Add research assistant application
b708f13
import dynamic from "next/dynamic";
/**
* Templates Barrel Export (Optimized for Scaling & Auth)
* * We use dynamic imports to split template-specific logic into separate chunks.
* The 'loading' state is set to null to avoid flashing a spinner to
* unauthenticated users before the route-level Auth Guard has cleared.
*/
export const DashboardTemplate = dynamic(
() => import("./DashboardTemplate").then((mod) => mod.DashboardTemplate),
{
ssr: true,
// We let the parent Layout handle the initial auth-check loading state.
// This prevents the 'spinner flash' on protected routes.
loading: () => null,
}
);
// Scale Note: As you add WriteSageTemplate or LibraryTemplate,
// they follow this same lazy-loading pattern.