@@ -0,0 +1,7 @@ +import { MainPage } from '#/views/index' +import { getDefaultLayout } from '#/widgets/layouts' + +MainPage.getLayout = getDefaultLayout({ titlePage: 'AIR' }) + +export default MainPage + @@ -1,7 +1,13 @@ -import { HomePage } from '#/views/home' -import { getDefaultLayout } from '#/widgets/layouts' +import { GetServerSideProps } from 'next' -HomePage.getLayout = getDefaultLayout({ titlePage: 'Главная' }) +export const getServerSideProps: GetServerSideProps = async () => ({ + redirect: { + destination: '/', + permanent: false, + }, +}) -export default HomePage +const HomePageRedirect = () => null + +export default HomePageRedirect @@ -1,7 +1,6 @@ -import { MainPage } from '#/views/index' +import { HomePage } from '#/views/home' import { getDefaultLayout } from '#/widgets/layouts' +HomePage.getLayout = getDefaultLayout({ titlePage: 'Главная' }) -MainPage.getLayout = getDefaultLayout({ titlePage: 'AIR' }) - -export default MainPage +export default HomePage @@ -59,7 +59,7 @@ const Home: NextPageWithLayout = () => { ] return ( - +