Polish settings and admin system pages
This commit is contained in:
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";
|
||||
|
||||
import { Alert, Box, Button, Paper, TextField, Typography } from "@mui/material";
|
||||
|
||||
import { api } from "../api";
|
||||
import { api, getApiErrorMessage } from "../api";
|
||||
import { useToast } from "../toast";
|
||||
import { useI18n } from "../i18n/I18nProvider";
|
||||
|
||||
@@ -31,7 +31,7 @@ export default function RulesSettingsCard() {
|
||||
})
|
||||
.catch((e: any) => {
|
||||
setS(null);
|
||||
setLoadError(String(e?.response?.data || e?.message || t("rulesLoadFailed")));
|
||||
setLoadError(getApiErrorMessage(e, t("rulesLoadFailed")));
|
||||
});
|
||||
}, [t]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user