mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 23:51:11 -05:00
Fix: Approve database migration
This commit is contained in:
@@ -16,6 +16,7 @@ import { useUserRole } from '@/hooks/useUserRole';
|
||||
import { toast } from '@/hooks/use-toast';
|
||||
import { submitCompanyCreation } from '@/lib/companyHelpers';
|
||||
import { useAuthModal } from '@/hooks/useAuthModal';
|
||||
import { getErrorMessage } from '@/lib/errorHandler';
|
||||
|
||||
export default function Manufacturers() {
|
||||
const navigate = useNavigate();
|
||||
@@ -80,10 +81,11 @@ export default function Manufacturers() {
|
||||
});
|
||||
|
||||
setIsCreateModalOpen(false);
|
||||
} catch (error: any) {
|
||||
} catch (error) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
toast({
|
||||
title: "Error",
|
||||
description: error.message || "Failed to submit manufacturer.",
|
||||
description: errorMsg,
|
||||
variant: "destructive"
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user