import { FC, useEffect, useState } from "react";
import { Box } from "@chakra-ui/react";
import { motion, useAnimation } from "framer-motion";
import { Forceful, SlowDown } from "@utils/anims";
import { joinClasses, useLocale } from "@utils/common";
import { HypergryphLogo } from "@components/logo/Hypergryph/Hypergryph";
import { MountainContourLogo } from "@components/logo/MountainContour/MountainContour";
import { Anchor } from "@components/anchor";
import terrainStyles from "./terrain.module.scss";
import { Language, LanguagePack } from "@states/global";
import { useAtom } from "jotai";
import { InImageFullScreenMode } from "@components/images";
export const Footer: FC = () => {
const [inImageFullScreenMode] = useAtom(InImageFullScreenMode);
const LogoAnimConfig = (delay = 0) => ({
initial: {
y: 50,
},
animate: {
y: 0,
},
transition: {
duration: .8,
ease: SlowDown,
delay,
}
});
const [lang] = useAtom(Language);
return (
);
};
const FooterText: FC<{ lang: string }> = ({ lang }) => {
const locale = useLocale(lang, useAtom(LanguagePack)[0]);
const control = useAnimation();
const sequence = async () => {
await control.start({ opacity: 0 });
await control.start({ opacity: 1 });
};
const [smallHorizontal, setSmallHorizontal] = useState(false);
const listener = () => {
const portrait = window.innerWidth < 814;
if (smallHorizontal !== portrait)
setSmallHorizontal(_current => portrait !== _current ? portrait : _current);
};
useEffect(() => {
void sequence();
listener();
window.addEventListener('resize', listener);
return () => {
window.removeEventListener('resize', listener);
control.start({ opacity: 0 }).then(control.stop);
};
} , [locale]);
return (
{locale(smallHorizontal ? "footer.fanmade::short" : "footer.fanmade")}
{locale("footer.to-offcl")} |
{locale("footer.cn-ver")}
Amane
•
{locale("footer.viewsrc")}
);
};
const TerrainMap = () => {
return(
);
};