2024-10-04 14:45:54 +05:30
|
|
|
import { newsAtom, showNewsModalAtom } from "@/atoms/news-atom";
|
2024-09-01 17:31:45 +05:30
|
|
|
import { translationAtom } from "@/atoms/translations-atom";
|
2024-01-15 19:14:44 +05:30
|
|
|
import { useAtomValue, useSetAtom } from "jotai";
|
2022-11-12 02:09:28 +05:30
|
|
|
import React from "react";
|
|
|
|
|
|
|
|
function Footer() {
|
2024-01-15 19:14:44 +05:30
|
|
|
const setShowNewsModal = useSetAtom(showNewsModalAtom);
|
2024-01-15 19:19:25 +05:30
|
|
|
const news = useAtomValue(newsAtom);
|
2024-09-01 17:31:45 +05:30
|
|
|
const t = useAtomValue(translationAtom);
|
2024-01-15 19:14:44 +05:30
|
|
|
|
2022-11-12 02:09:28 +05:30
|
|
|
return (
|
2023-04-12 18:55:24 +05:30
|
|
|
<div className="p-2 text-center text-xs text-base-content/50">
|
2024-01-15 19:19:25 +05:30
|
|
|
{news && !news?.data?.dontShow && (
|
|
|
|
<button
|
|
|
|
className="badge badge-neutral mb-2"
|
2024-09-01 17:31:45 +05:30
|
|
|
onClick={() => setShowNewsModal(true)}
|
|
|
|
>
|
2024-09-03 13:04:58 +05:30
|
|
|
{t("FOOTER.NEWS_TITLE")}
|
2024-01-15 19:19:25 +05:30
|
|
|
</button>
|
|
|
|
)}
|
2022-11-12 02:09:28 +05:30
|
|
|
<p>
|
2024-09-03 13:04:58 +05:30
|
|
|
{t("FOOTER.COPYRIGHT")} {new Date().getFullYear()} -{" "}
|
2022-11-12 02:09:28 +05:30
|
|
|
<a
|
|
|
|
className="font-bold"
|
|
|
|
href="https://github.com/upscayl/upscayl"
|
2024-09-01 17:31:45 +05:30
|
|
|
target="_blank"
|
|
|
|
>
|
2024-09-03 13:04:58 +05:30
|
|
|
{t("TITLE")}
|
2023-04-16 08:09:38 +05:30
|
|
|
</a>
|
2022-11-12 02:09:28 +05:30
|
|
|
</p>
|
|
|
|
<p>
|
2024-09-03 13:04:58 +05:30
|
|
|
{t("FOOTER.TITLE")}
|
2022-11-12 02:09:28 +05:30
|
|
|
<a
|
2023-08-10 15:14:44 +05:30
|
|
|
href="https://github.com/upscayl"
|
2022-11-12 02:09:28 +05:30
|
|
|
className="font-bold"
|
2024-09-01 17:31:45 +05:30
|
|
|
target="_blank"
|
|
|
|
>
|
2024-09-03 13:04:58 +05:30
|
|
|
{t("FOOTER.LINK_TITLE")}
|
2022-11-12 02:09:28 +05:30
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Footer;
|