mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 17:51:12 -05:00
Refactor: Unify moderation queue for all entities
This commit is contained in:
@@ -51,24 +51,18 @@ export default function DesignerDetail() {
|
||||
|
||||
const handleEditSubmit = async (data: any) => {
|
||||
try {
|
||||
const result = await submitCompanyUpdate(
|
||||
await submitCompanyUpdate(
|
||||
designer!.id,
|
||||
data,
|
||||
user!.id,
|
||||
isModerator()
|
||||
user!.id
|
||||
);
|
||||
|
||||
toast({
|
||||
title: result.submitted ? "Edit Submitted" : "Designer Updated",
|
||||
description: result.submitted
|
||||
? "Your edit has been submitted for review."
|
||||
: "The designer has been updated successfully."
|
||||
title: "Edit Submitted",
|
||||
description: "Your edit has been submitted for review."
|
||||
});
|
||||
|
||||
setIsEditModalOpen(false);
|
||||
if (!result.submitted) {
|
||||
fetchDesignerData();
|
||||
}
|
||||
} catch (error: any) {
|
||||
toast({
|
||||
title: "Error",
|
||||
|
||||
Reference in New Issue
Block a user