add locale for document history view
This commit is contained in:
@@ -8,6 +8,7 @@ import { useReactTable, getCoreRowModel, getSortedRowModel, getPaginationRowMode
|
||||
import { formatDate, formatDateTime } from '@/app/lib/formatDate';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useViewport } from '@/app/hooks/useViewport';
|
||||
import { useLocale } from 'next-intl';
|
||||
|
||||
export function TrackingHistoryView() {
|
||||
const [pagination, setPagination] = useState({
|
||||
@@ -16,6 +17,7 @@ export function TrackingHistoryView() {
|
||||
});
|
||||
const [sorting, setSorting] = useState<SortingState>([]);
|
||||
const t = useTranslations('Global');
|
||||
const locale = useLocale();
|
||||
|
||||
const {
|
||||
data: apiResponse,
|
||||
@@ -24,7 +26,7 @@ export function TrackingHistoryView() {
|
||||
isError,
|
||||
error,
|
||||
refetch
|
||||
} = useHistoryView(pagination.pageIndex, pagination.pageSize);
|
||||
} = useHistoryView(pagination.pageIndex, pagination.pageSize, locale);
|
||||
|
||||
const tableData = apiResponse?.history || [];
|
||||
const totalItems = apiResponse?.history.length || 0;
|
||||
|
||||
Reference in New Issue
Block a user