feat(i18n) : add personal languages and compact weapon exports
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslation } from "@/components/i18n/locale-provider";
|
||||
import type { ComponentProps, ReactNode } from "react";
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
|
||||
|
||||
@@ -13,12 +14,13 @@ export function SimpleTooltip({
|
||||
side?: "top" | "right" | "bottom" | "left" | undefined;
|
||||
children: ReactNode;
|
||||
} & Omit<ComponentProps<typeof Tooltip>, "children">) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Tooltip {...props}>
|
||||
<TooltipTrigger render={<span className="inline-flex" />}>
|
||||
{children}
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side={side}>{text}</TooltipContent>
|
||||
<TooltipContent side={side}>{typeof text === "string" ? t(text) : text}</TooltipContent>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user