Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update modal-provider.tsx

Steven Tey3c2243e6b137
diff --git a/apps/web/ui/modals/modal-provider.tsx b/apps/web/ui/modals/modal-provider.tsx
index 320a487eea..9834b26e53 100644
--- a/apps/web/ui/modals/modal-provider.tsx
+++ b/apps/web/ui/modals/modal-provider.tsx
@@ -145,8 +145,10 @@ function ModalProviderClient({ children }: { children: ReactNode }) {
// handle invite and oauth modals
useEffect(() => {
- setShowAcceptInviteModal(true);
- }, []);
+ if (error && (error.status === 409 || error.status === 410)) {
+ setShowAcceptInviteModal(true);
+ }
+ }, [error]);
// handle ?newWorkspace and ?newLink query params
useEffect(() => {