We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3cd86ed commit 8841f28Copy full SHA for 8841f28
frontend/src/component/modal/BanSteamModal.tsx
@@ -18,7 +18,8 @@ import {
18
BanTypeCollection,
19
Duration,
20
DurationCollection,
21
- schemaBanPayloadSteam
+ schemaBanPayloadSteam,
22
+ SteamBanRecord
23
} from '../../schema/bans.ts';
24
import { ErrorDetails } from '../ErrorDetails.tsx';
25
import { Heading } from '../Heading';
@@ -35,7 +36,11 @@ export const BanSteamModal = NiceModal.create(({ ban_id }: { ban_id?: number })
35
36
} = useQuery({
37
queryKey: ['ban', { ban_id }],
38
queryFn: async () => {
- return await apiGetBanSteam(Number(ban_id), true);
39
+ if (ban_id && ban_id > 0) {
40
+ return await apiGetBanSteam(Number(ban_id), true);
41
+ }
42
+
43
+ return {} as SteamBanRecord;
44
}
45
});
46
0 commit comments