perf: SSR for /teams (#20824)

* finish

* improve

* refactor

* add revalidations

* /settings/teams is not needed

* refactor

* rename

* redundant type casting
This commit is contained in:
Benny Joo authored and GitHub committed 2025-04-23 15:09:25 +01:00
1 parent e29f6af540
commit b32b31ccdc
23 files changed
+195 -140

No files matched your search

@@ -3,6 +3,7 @@ import { CreateANewTeamForm } from "@calcom/features/ee/teams/components";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { DialogContent } from "@calcom/ui/components/dialog";
import { revalidateTeamsList } from "@calcom/web/app/(use-page-wrapper)/(main-nav)/teams/actions";
interface CreateTeamDialogProps {
open: boolean;
@@ -24,6 +25,7 @@ const CreateTeamDialog = (props: CreateTeamDialogProps) => {
onSuccess={async () => {
await utils.viewer.dsync.teamGroupMapping.get.invalidate();
await utils.viewer.teams.list.invalidate();
revalidateTeamsList();
onOpenChange(false);
}}
/>