Forward query params from Team Profile page (#9057)

Co-authored-by: alannnc <[email protected]>
This commit is contained in:
Hariom Balharaandalannnc authored and GitHub committed 2023-05-23 08:18:51 +00:00
1 parent e20cb4a999
commit ec43f3f2c0
2 files changed
+20 -4

No files matched your search

+6 -2
View File
@@ -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<TeamType, "members"> & { members: MemberType[]
const Member = ({ member, teamName }: { member: MemberType; teamName: string | null }) => {
const { t } = useLocale();
const router = useRouter();
const isBioEmpty = !member.bio || !member.bio.replace("<p><br></p>", "").length;
// slug is a route parameter, we don't want to forward it to the next route
const { slug: _slug, ...queryParamsToForward } = router.query;
return (
<Link key={member.id} href={`/${member.username}`}>
<Link key={member.id} href={{ pathname: `/${member.username}`, query: queryParamsToForward }}>
<div className="sm:min-w-80 sm:max-w-80 bg-default hover:bg-muted border-subtle group flex min-h-full flex-col space-y-2 rounded-md border p-4 hover:cursor-pointer">
<Avatar
size="md"