* refactor: move from next-international to next-intl * refactor: restructure translation package, * chore: change i18n-allay framework to next-intl * fix: add missing bold html tag to translation * fix: format issue * fix: address deepsource issues * fix: remove international-types dependency * fix: lint and typecheck issues * fix: typecheck issue * fix: typecheck issue * fix: issue with translations
15 lines
503 B
TypeScript
15 lines
503 B
TypeScript
import type { MRT_RowData, MRT_TableOptions } from "mantine-react-table";
|
|
import { useMantineReactTable } from "mantine-react-table";
|
|
|
|
import { useI18nMessages } from "@homarr/translation/client";
|
|
|
|
export const useTranslatedMantineReactTable = <TData extends MRT_RowData>(
|
|
tableOptions: Omit<MRT_TableOptions<TData>, "localization">,
|
|
) => {
|
|
const messages = useI18nMessages();
|
|
return useMantineReactTable<TData>({
|
|
...tableOptions,
|
|
localization: messages.common.mantineReactTable,
|
|
});
|
|
};
|