aboutsummaryrefslogtreecommitdiff
path: root/components/shared/footer.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 /components/shared/footer.js
parentfixed redis error for manga (#95) (diff)
downloadmoopa-0a30e0570a5d22dd8c459fd9769fe4386c07aae8.tar.xz
moopa-0a30e0570a5d22dd8c459fd9769fe4386c07aae8.zip
Update v4.2.1v4.2.1
Diffstat (limited to 'components/shared/footer.js')
-rw-r--r--components/shared/footer.js54
1 files changed, 7 insertions, 47 deletions
diff --git a/components/shared/footer.js b/components/shared/footer.js
index 0e19f13..a29a3d3 100644
--- a/components/shared/footer.js
+++ b/components/shared/footer.js
@@ -1,45 +1,18 @@
import Link from "next/link";
-import { useEffect, useState } from "react";
+import { useState } from "react";
import { useRouter } from "next/router";
-import { parseCookies, setCookie } from "nookies";
-import Image from "next/image";
function Footer() {
const [year] = useState(new Date().getFullYear());
const [season] = useState(getCurrentSeason());
- const [lang, setLang] = useState("en");
const [checked, setChecked] = useState(false);
- const [cookie, setCookies] = useState(null);
const router = useRouter();
- useEffect(() => {
- let lang = null;
- if (!cookie) {
- const cookie = parseCookies();
- lang = cookie.lang || null;
- setCookies(cookie);
- }
- if (lang === "en" || lang === null) {
- setLang("en");
- setChecked(false);
- } else if (lang === "id") {
- setLang("id");
- setChecked(true);
- }
-
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, []);
-
function switchLang() {
setChecked(!checked);
if (checked) {
- console.log("switching to en");
- setCookie(null, "lang", "en", {
- maxAge: 365 * 24 * 60 * 60,
- path: "/",
- });
router.push("/en");
} else {
router.push("/id");
@@ -51,36 +24,25 @@ function Footer() {
<div className="text-[#dbdcdd] z-40 bg-[#0c0d10] lg:flex lg:h-[12rem] w-full lg:items-center lg:justify-between">
<div className="mx-auto flex w-[90%] lg:w-[95%] xl:w-[80%] flex-col space-y-10 py-6 lg:flex-row lg:items-center lg:justify-between lg:space-y-0 lg:py-0">
<div className="flex flex-col gap-2">
- {/* <div className="flex items-center gap-2"> */}
- {/* <Image
- src="/svg/c.svg"
- alt="Website Logo"
- width={100}
- height={100}
- className="w-10 h-10"
- /> */}
<div className="flex gap-2 font-outfit text-4xl">moopa</div>
<p className="font-karla lg:text-[0.8rem] text-[0.65rem] text-[#9c9c9c] lg:w-[520px] italic">
This site does not store any files on our server, we only linked
to the media which is hosted on 3rd party services.
</p>
- {/* </div> */}
</div>
<div className="flex flex-col gap-10 lg:flex-row lg:items-end lg:gap-[9.06rem] text-[#a7a7a7] text-sm lg:text-end">
<div className="flex flex-col gap-10 font-karla font-bold lg:flex-row lg:gap-[5.94rem]">
<ul className="flex flex-col gap-y-[0.7rem] ">
<li className="cursor-pointer hover:text-action">
- <Link
- href={`/${lang}/search/anime?season=${season}&year=${year}`}
- >
+ <Link href={`/en/search/anime?season=${season}&year=${year}`}>
This Season
</Link>
</li>
<li className="cursor-pointer hover:text-action">
- <Link href={`/${lang}/search/anime`}>Popular Anime</Link>
+ <Link href={`/en/search/anime`}>Popular Anime</Link>
</li>
<li className="cursor-pointer hover:text-action">
- <Link href={`/${lang}/search/manga`}>Popular Manga</Link>
+ <Link href={`/en/search/manga`}>Popular Manga</Link>
</li>
<li className="cursor-pointer hover:text-action">
<Link href={`/donate`}>Donate</Link>
@@ -88,15 +50,13 @@ function Footer() {
</ul>
<ul className="flex flex-col gap-y-[0.7rem]">
<li className="cursor-pointer hover:text-action">
- <Link href={`/${lang}/search/anime?format=MOVIE`}>
- Movies
- </Link>
+ <Link href={`/en/search/anime?format=MOVIE`}>Movies</Link>
</li>
<li className="cursor-pointer hover:text-action">
- <Link href={`/${lang}/search/anime?format=TV`}>TV Shows</Link>
+ <Link href={`/en/search/anime?format=TV`}>TV Shows</Link>
</li>
<li className="cursor-pointer hover:text-action">
- <Link href={`/${lang}/dmca`}>DMCA</Link>
+ <Link href={`/en/dmca`}>DMCA</Link>
</li>
<li className="cursor-pointer hover:text-action">
<Link href="https://github.com/DevanAbinaya/Ani-Moopa">