fix(i18n): localize admin user grid controls in Bokmal
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
} from "@mui/material";
|
||||
import useMediaQuery from "@mui/material/useMediaQuery";
|
||||
import { DataGrid, GridColDef } from "@mui/x-data-grid";
|
||||
import { nbNO } from "@mui/x-data-grid/locales";
|
||||
|
||||
import { api, getApiErrorMessage } from "../api";
|
||||
import { useToast } from "../toast";
|
||||
@@ -39,7 +40,7 @@ export default function AdminUsersPage() {
|
||||
const isMobile = useMediaQuery("(max-width:767.95px)");
|
||||
const { toast } = useToast();
|
||||
const { confirmAction } = useDialogActions();
|
||||
const { t } = useI18n();
|
||||
const { t, language } = useI18n();
|
||||
const [busy, setBusy] = useState(false);
|
||||
const owner = useRef({ mounted: true, generation: 0, busy: false });
|
||||
const body = useRef<HTMLDivElement>(null);
|
||||
@@ -293,6 +294,7 @@ export default function AdminUsersPage() {
|
||||
) : (
|
||||
<Paper variant="outlined" role="region" aria-label={t("adminUsersTitle")} tabIndex={0} sx={{ borderRadius: 1, minWidth: 0, overflow: "auto" }}>
|
||||
<DataGrid
|
||||
localeText={language === "nb" ? nbNO.components.MuiDataGrid.defaultProps.localeText : undefined}
|
||||
autoHeight
|
||||
getRowHeight={() => "auto"}
|
||||
rows={rows}
|
||||
|
||||
Reference in New Issue
Block a user