diff options
Diffstat (limited to 'components/data-table/data-table-pin-left.tsx')
| -rw-r--r-- | components/data-table/data-table-pin-left.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/components/data-table/data-table-pin-left.tsx b/components/data-table/data-table-pin-left.tsx index 27116774..aed86844 100644 --- a/components/data-table/data-table-pin-left.tsx +++ b/components/data-table/data-table-pin-left.tsx @@ -20,6 +20,8 @@ import { PopoverContent, PopoverTrigger, } from "@/components/ui/popover" +import { useTranslation } from '@/i18n/client' +import { useParams, usePathname } from "next/navigation"; /** * Helper function to check if a column is a parent column (has subcolumns) @@ -92,6 +94,9 @@ const AUTO_PIN_LEFT_COLUMNS = ['select'] export function PinLeftButton<TData>({ table }: { table: Table<TData> }) { const [open, setOpen] = React.useState(false) const triggerRef = React.useRef<HTMLButtonElement>(null) + const params = useParams(); + const lng = params?.lng as string; + const { t } = useTranslation(lng); // Try to auto-pin select and action columns if they exist React.useEffect(() => { @@ -180,7 +185,7 @@ export function PinLeftButton<TData>({ table }: { table: Table<TData> }) { <MoveLeft className="size-4" /> <span className="hidden sm:inline"> - 왼쪽 고정 + {t("tableToolBar.leftPin")} </span> </Button> </PopoverTrigger> |
