Remove redundant setLoading calls
This commit is contained in:
parent
2a49ebc845
commit
a153116071
@ -52,7 +52,6 @@ export default function (props: AppealCardProps & { port?: MessagePort }) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (actionReq.ok) {
|
if (actionReq.ok) {
|
||||||
setLoading(false);
|
|
||||||
toast({
|
toast({
|
||||||
description: `Appeal ${action === "accept" ? "accepted" : "denied"}`,
|
description: `Appeal ${action === "accept" ? "accepted" : "denied"}`,
|
||||||
duration: 5000,
|
duration: 5000,
|
||||||
@ -67,7 +66,7 @@ export default function (props: AppealCardProps & { port?: MessagePort }) {
|
|||||||
} catch {
|
} catch {
|
||||||
error = "Unknown error";
|
error = "Unknown error";
|
||||||
}
|
}
|
||||||
setLoading(false);
|
|
||||||
toast({
|
toast({
|
||||||
description: error,
|
description: error,
|
||||||
duration: 10000,
|
duration: 10000,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user