mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 14:11:13 -05:00
Refactor: Unify moderation queue for all entities
This commit is contained in:
@@ -32,15 +32,14 @@ export default function Designers() {
|
||||
navigate('/auth');
|
||||
return;
|
||||
}
|
||||
const result = await submitCompanyCreation(data, 'designer', user.id, isModerator());
|
||||
await submitCompanyCreation(data, 'designer', user.id);
|
||||
toast({
|
||||
title: result.submitted ? "Designer Submitted" : "Designer Created",
|
||||
description: result.submitted ? "Your submission has been sent for review." : "The designer has been created successfully."
|
||||
title: "Designer Submitted",
|
||||
description: "Your submission has been sent for review."
|
||||
});
|
||||
setIsCreateModalOpen(false);
|
||||
if (!result.submitted) fetchCompanies();
|
||||
} catch (error: any) {
|
||||
toast({ title: "Error", description: error.message || "Failed to create designer.", variant: "destructive" });
|
||||
toast({ title: "Error", description: error.message || "Failed to submit designer.", variant: "destructive" });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user