Use built-in Next layout support + lazy load

Instead of doing manual layout switching use the Nextjs nested layout
support. Also add some additional lazy loading of components. This is to
work on performance score re: #2167.
This commit is contained in:
Gabe Kangas
2023-01-09 01:06:39 -08:00
parent 15747f86dd
commit c05a20a460
8 changed files with 108 additions and 83 deletions

View File

@@ -1,5 +1,9 @@
import { ReactElement } from 'react';
import { Main } from '../components/layouts/Main';
export default function Home() {
return <Main />;
}
Home.getLayout = function getLayout(page: ReactElement) {
return page;
};