aboutsummaryrefslogtreecommitdiff
path: root/pages/index.js
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-10-24 11:05:06 +0700
committerFactiven <[email protected]>2023-10-24 11:05:06 +0700
commit0a30e0570a5d22dd8c459fd9769fe4386c07aae8 (patch)
tree67346a73b4be2ed5e5a7008828e4bc70bac3bd92 /pages/index.js
parentfixed redis error for manga (#95) (diff)
downloadmoopa-0a30e0570a5d22dd8c459fd9769fe4386c07aae8.tar.xz
moopa-0a30e0570a5d22dd8c459fd9769fe4386c07aae8.zip
Update v4.2.1v4.2.1
Diffstat (limited to 'pages/index.js')
-rw-r--r--pages/index.js33
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,
+ },
+ };
}