1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-24 15:40:21 +01:00
upscayl/renderer/components/Footer.tsx

46 lines
1.2 KiB
TypeScript
Raw Normal View History

import { newsAtom, showNewsModalAtom } from "@/atoms/newsAtom";
import { translationAtom } from "@/atoms/translations-atom";
import { useAtomValue, useSetAtom } from "jotai";
2022-11-11 21:39:28 +01:00
import React from "react";
function Footer() {
const setShowNewsModal = useSetAtom(showNewsModalAtom);
const news = useAtomValue(newsAtom);
const t = useAtomValue(translationAtom);
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">
{news && !news?.data?.dontShow && (
<button
className="badge badge-neutral mb-2"
onClick={() => setShowNewsModal(true)}
>
{t("FOOTER.NEWS_TITLE")}
</button>
)}
2022-11-11 21:39:28 +01:00
<p>
{t("FOOTER.COPYRIGHT")} {new Date().getFullYear()} -{" "}
2022-11-11 21:39:28 +01:00
<a
className="font-bold"
href="https://github.com/upscayl/upscayl"
target="_blank"
>
{t("TITLE")}
</a>
2022-11-11 21:39:28 +01:00
</p>
<p>
{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"
target="_blank"
>
{t("FOOTER.LINK_TITLE")}
2022-11-11 21:39:28 +01:00
</a>
</p>
</div>
);
}
export default Footer;