diff options
| author | Factiven <[email protected]> | 2023-10-24 11:05:06 +0700 |
|---|---|---|
| committer | Factiven <[email protected]> | 2023-10-24 11:05:06 +0700 |
| commit | 0a30e0570a5d22dd8c459fd9769fe4386c07aae8 (patch) | |
| tree | 67346a73b4be2ed5e5a7008828e4bc70bac3bd92 /pages/index.js | |
| parent | fixed redis error for manga (#95) (diff) | |
| download | moopa-0a30e0570a5d22dd8c459fd9769fe4386c07aae8.tar.xz moopa-0a30e0570a5d22dd8c459fd9769fe4386c07aae8.zip | |
Update v4.2.1v4.2.1
Diffstat (limited to 'pages/index.js')
| -rw-r--r-- | pages/index.js | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/pages/index.js b/pages/index.js index 56b2c1f..25d5b20 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,5 +1,4 @@ import Head from "next/head"; -import { parseCookies } from "nookies"; export default function Home() { return ( @@ -23,29 +22,11 @@ export default function Home() { ); } -export async function getServerSideProps(context) { - const cookie = parseCookies(context); - - if (cookie.lang === "en") { - return { - redirect: { - destination: "/en", - permanent: false, - }, - }; - } else if (cookie.lang === "id") { - return { - redirect: { - destination: "/id", - permanent: false, - }, - }; - } else { - return { - redirect: { - destination: "/en", - permanent: false, - }, - }; - } +export async function getServerSideProps() { + return { + redirect: { + destination: "/en", + permanent: false, + }, + }; } |