diff options
Diffstat (limited to 'components/data-table/data-table-view-options.tsx')
| -rw-r--r-- | components/data-table/data-table-view-options.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/data-table/data-table-view-options.tsx b/components/data-table/data-table-view-options.tsx index c4167b47..422e3065 100644 --- a/components/data-table/data-table-view-options.tsx +++ b/components/data-table/data-table-view-options.tsx @@ -37,6 +37,8 @@ import { SortableItem, SortableDragHandle, } from "@/components/ui/sortable" +import { useTranslation } from '@/i18n/client' +import { useParams, usePathname } from "next/navigation"; /** @@ -68,6 +70,10 @@ export function DataTableViewOptions<TData>({ }: DataTableViewOptionsProps<TData>) { const triggerRef = React.useRef<HTMLButtonElement>(null) + const params = useParams(); + const lng = params?.lng as string; + const { t } = useTranslation(lng); + // 1) Identify columns that can be hidden const hideableCols = React.useMemo(() => { return table @@ -128,7 +134,7 @@ export function DataTableViewOptions<TData>({ className="gap-2" > <Settings2 className="size-4" /> - <span className="hidden sm:inline">보기</span> + <span className="hidden sm:inline">{t("tableToolBar.view")}</span> </Button> </PopoverTrigger> |
