diff --git a/apps/web/components/team/screens/Team.tsx b/apps/web/components/team/screens/Team.tsx index 5cbf3fe8ef..6503636861 100644 --- a/apps/web/components/team/screens/Team.tsx +++ b/apps/web/components/team/screens/Team.tsx @@ -1,4 +1,5 @@ import Link from "next/link"; +import { useRouter } from "next/router"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; @@ -14,11 +15,14 @@ type TeamTypeWithSafeHtml = Omit & { members: MemberType[] const Member = ({ member, teamName }: { member: MemberType; teamName: string | null }) => { const { t } = useLocale(); - + const router = useRouter(); const isBioEmpty = !member.bio || !member.bio.replace("


", "").length; + // slug is a route parameter, we don't want to forward it to the next route + const { slug: _slug, ...queryParamsToForward } = router.query; + return ( - +
(
    {team.eventTypes.map((type, index) => ( @@ -67,7 +70,10 @@ function TeamPage({ team, isUnpublished, markdownStrippedBio }: TeamPageProps) { )}>
    { sdkActionManager?.fire("eventTypeSelected", { eventType: type, @@ -146,7 +152,13 @@ function TeamPage({ team, isUnpublished, markdownStrippedBio }: TeamPageProps) { color="minimal" EndIcon={ArrowRight} className="dark:hover:bg-darkgray-200" - href={`/team/${team.slug}?members=1`} + href={{ + pathname: `/team/${team.slug}`, + query: { + members: "1", + ...queryParamsToForward, + }, + }} shallow={true}> {t("book_a_team_member")}