diff --git a/apps/web/modules/onboarding/teams/details/team-details-view.tsx b/apps/web/modules/onboarding/teams/details/team-details-view.tsx index 6098424302..bbc55295f5 100644 --- a/apps/web/modules/onboarding/teams/details/team-details-view.tsx +++ b/apps/web/modules/onboarding/teams/details/team-details-view.tsx @@ -1,7 +1,7 @@ "use client"; import { useRouter } from "next/navigation"; -import { useEffect, useRef, useState } from "react"; +import { useEffect, useRef, useState, type FormEvent } from "react"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import slugify from "@calcom/lib/slugify"; @@ -65,7 +65,9 @@ export const TeamDetailsView = ({ userEmail }: TeamDetailsViewProps) => { setTeamLogo(newLogo); }; - const handleContinue = async () => { + const handleContinue = async (e?: FormEvent) => { + e?.preventDefault(); + if (!isSlugValid) { return; } @@ -81,7 +83,8 @@ export const TeamDetailsView = ({ userEmail }: TeamDetailsViewProps) => { }); // Create the team (will handle payment redirect if needed) - await createTeam(store); + // Don't pass store - let createTeam read the latest state from the store + await createTeam(); }; return ( @@ -89,82 +92,87 @@ export const TeamDetailsView = ({ userEmail }: TeamDetailsViewProps) => { {/* Left column - Main content */}
- - - -
- }> -
- {/* Team Profile Picture */} -
- -
-
- + + + +
+ }> +
+ {/* Team Profile Picture */} +
+ +
+
+ +
+ +
- - + {t("onboarding_logo_size_hint")} +

+
+ + {/* Team Name */} +
+ + setTeamName(e.target.value)} + placeholder="Acme Inc." + className="border-default h-7 rounded-[10px] border px-2 py-1.5 text-sm" />
-

{t("onboarding_logo_size_hint")}

-
- {/* Team Name */} -
- - setTeamName(e.target.value)} - placeholder="Acme Inc." - className="border-default h-7 rounded-[10px] border px-2 py-1.5 text-sm" + {/* Team Slug */} + -
- {/* Team Slug */} - - - {/* Team Bio */} -
- -