aboutsummaryrefslogtreecommitdiff
path: root/pages/index.js
diff options
context:
space:
mode:
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,
+ },
+ };
}