mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-02-04 04:30:06 +00:00
minor bug fixes (#110)
This commit is contained in:
@@ -29,6 +29,7 @@ import { useTranslation } from "react-i18next"
|
|||||||
import { toast } from "sonner"
|
import { toast } from "sonner"
|
||||||
import { KeyedMutator } from "swr"
|
import { KeyedMutator } from "swr"
|
||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
import { Checkbox } from "./ui/checkbox"
|
import { Checkbox } from "./ui/checkbox"
|
||||||
import { Label } from "./ui/label"
|
import { Label } from "./ui/label"
|
||||||
|
|
||||||
@@ -163,9 +164,7 @@ export const NATCard: React.FC<NATCardProps> = ({ data, mutate }) => {
|
|||||||
checked={field.value}
|
checked={field.value}
|
||||||
onCheckedChange={field.onChange}
|
onCheckedChange={field.onChange}
|
||||||
/>
|
/>
|
||||||
<Label className="text-sm">
|
<Label className="text-sm">{t("Enable")}</Label>
|
||||||
{t("Enable")}
|
|
||||||
</Label>
|
|
||||||
</div>
|
</div>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export const NotificationProvider: React.FC<NotificationProviderProps> = ({
|
|||||||
if (withNotifier)
|
if (withNotifier)
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
const n = await getNotification()
|
const n = (await getNotification()) || []
|
||||||
const nData = n.map(({ id, name }) => ({ id, name }))
|
const nData = n.map(({ id, name }) => ({ id, name }))
|
||||||
setNotifier(nData)
|
setNotifier(nData)
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export const ServerProvider: React.FC<ServerProviderProps> = ({
|
|||||||
if (withServer)
|
if (withServer)
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
const s = await getServers()
|
const s = (await getServers()) || []
|
||||||
const serverData = s.map(({ id, name }) => ({ id, name }))
|
const serverData = s.map(({ id, name }) => ({ id, name }))
|
||||||
setServer(serverData)
|
setServer(serverData)
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user