mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-26 05:11:12 -05:00
Wrap forms with error boundaries
This commit is contained in:
@@ -17,6 +17,7 @@ import { toast } from '@/hooks/use-toast';
|
||||
import { getErrorMessage, handleNonCriticalError } from '@/lib/errorHandler';
|
||||
import type { Ride, Company, RideModel } from "@/types/database";
|
||||
import { useDocumentTitle } from '@/hooks/useDocumentTitle';
|
||||
import { SubmissionErrorBoundary } from '@/components/error/SubmissionErrorBoundary';
|
||||
|
||||
export default function RideModelRides() {
|
||||
const { manufacturerSlug, modelSlug } = useParams<{ manufacturerSlug: string; modelSlug: string }>();
|
||||
@@ -293,10 +294,12 @@ export default function RideModelRides() {
|
||||
{/* Create Modal */}
|
||||
<Dialog open={isCreateModalOpen} onOpenChange={setIsCreateModalOpen}>
|
||||
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
|
||||
<RideForm
|
||||
onSubmit={handleCreateSubmit}
|
||||
onCancel={() => setIsCreateModalOpen(false)}
|
||||
/>
|
||||
<SubmissionErrorBoundary>
|
||||
<RideForm
|
||||
onSubmit={handleCreateSubmit}
|
||||
onCancel={() => setIsCreateModalOpen(false)}
|
||||
/>
|
||||
</SubmissionErrorBoundary>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user