mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-02-05 21:20:07 +00:00
feat(I18n): Add multiple languages (zh-CN/zh-TW/en/it) (#8)
This commit is contained in:
@@ -5,17 +5,20 @@ import {
|
||||
} from "@/components/ui/tabs"
|
||||
import { Link, useLocation } from "react-router-dom"
|
||||
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export const GroupTab = ({ className }: { className?: string }) => {
|
||||
const { t } = useTranslation();
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<Tabs defaultValue={location.pathname} className={className}>
|
||||
<TabsList className="grid w-full grid-cols-2">
|
||||
<TabsTrigger value="/dashboard/server-group" asChild>
|
||||
<Link to="/dashboard/server-group">Server</Link>
|
||||
<Link to="/dashboard/server-group">{t("Server")}</Link>
|
||||
</TabsTrigger>
|
||||
<TabsTrigger value="/dashboard/notification-group" asChild>
|
||||
<Link to="/dashboard/notification-group">Notification</Link>
|
||||
<Link to="/dashboard/notification-group">{t("Notification")}</Link>
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
</Tabs>
|
||||
|
||||
Reference in New Issue
Block a user