index.tsx19 lines · main
| 1 | import { IS_PLATFORM } from 'common' |
| 2 | |
| 3 | import { Home } from '@/components/interfaces/Home/Home' |
| 4 | import { ProjectHome } from '@/components/interfaces/ProjectHome/Home' |
| 5 | import DefaultLayout from '@/components/layouts/DefaultLayout' |
| 6 | import { ProjectLayoutWithAuth } from '@/components/layouts/ProjectLayout' |
| 7 | import type { NextPageWithLayout } from '@/types' |
| 8 | |
| 9 | const HomePage: NextPageWithLayout = () => { |
| 10 | return IS_PLATFORM ? <ProjectHome /> : <Home /> |
| 11 | } |
| 12 | |
| 13 | HomePage.getLayout = (page) => ( |
| 14 | <DefaultLayout> |
| 15 | <ProjectLayoutWithAuth>{page}</ProjectLayoutWithAuth> |
| 16 | </DefaultLayout> |
| 17 | ) |
| 18 | |
| 19 | export default HomePage |