refactor(routes): convert route components to lazy-loaded for improved performance
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { ProfilePage } from '@/features/profile/profile-page';
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import { createFileRoute, lazyRouteComponent } from '@tanstack/react-router';
|
||||
|
||||
const ProfilePage = lazyRouteComponent(
|
||||
() => import('@/features/profile/profile-page'),
|
||||
'ProfilePage'
|
||||
);
|
||||
|
||||
export const Route = createFileRoute('/_app/profile')({
|
||||
component: ProfilePage,
|
||||
|
||||
Reference in New Issue
Block a user