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