1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-01-19 01:24:09 +01:00

36 lines
787 B
TypeScript
Raw Normal View History

import { translationAtom } from "@/atoms/translations-atom";
import { useAtomValue } from "jotai";
2023-03-18 22:38:50 +05:30
import React from "react";
type TabsProps = {
selectedTab: number;
setSelectedTab: (tab: number) => void;
};
const Tabs = ({ selectedTab, setSelectedTab }: TabsProps) => {
const t = useAtomValue(translationAtom);
2023-03-18 22:38:50 +05:30
return (
2024-04-20 21:14:42 +05:30
<div className="tabs-boxed tabs mx-auto mb-2">
2023-03-18 22:38:50 +05:30
<a
className={`tab ${selectedTab === 0 && "tab-active"}`}
onClick={() => {
setSelectedTab(0);
2024-04-20 21:14:42 +05:30
}}
>
{t("TITLE")}
2023-03-18 22:38:50 +05:30
</a>
<a
className={`tab ${selectedTab === 1 && "tab-active"}`}
onClick={() => {
setSelectedTab(1);
2024-04-20 21:14:42 +05:30
}}
>
{t("SETTINGS.TITLE")}
2023-03-18 22:38:50 +05:30
</a>
</div>
);
};
export default Tabs;