1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-28 01:10:52 +01:00
upscayl/renderer/components/Tabs.tsx
NayamAmarshe d721e7ae7f
Update to new schema, ADD: zh, ja, ru, es and fr
MOD: All necessary strings to match
2024-09-05 21:37:19 -04:00

36 lines
787 B
TypeScript

import { translationAtom } from "@/atoms/translations-atom";
import { useAtomValue } from "jotai";
import React from "react";
type TabsProps = {
selectedTab: number;
setSelectedTab: (tab: number) => void;
};
const Tabs = ({ selectedTab, setSelectedTab }: TabsProps) => {
const t = useAtomValue(translationAtom);
return (
<div className="tabs-boxed tabs mx-auto mb-2">
<a
className={`tab ${selectedTab === 0 && "tab-active"}`}
onClick={() => {
setSelectedTab(0);
}}
>
{t("TITLE")}
</a>
<a
className={`tab ${selectedTab === 1 && "tab-active"}`}
onClick={() => {
setSelectedTab(1);
}}
>
{t("SETTINGS.TITLE")}
</a>
</div>
);
};
export default Tabs;