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