Hotfix: Installed Apps Tabs Switchi g (#5063)

* Hotfix: metadata parsing

* Use Router query as tabs use shallow routing, data-fetching doesnt occur on switching tabs

Co-authored-by: zomars <zomars@me.com>
pull/5065/head
Hariom Balhara 2022-10-18 14:16:06 +05:30 committed by GitHub
parent d0d793a719
commit 2e169801e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import { InferGetServerSidePropsType } from "next"; import { InferGetServerSidePropsType } from "next";
import { useRouter } from "next/router";
import z from "zod"; import z from "zod";
import { AppSettings } from "@calcom/app-store/_components/AppSettings"; import { AppSettings } from "@calcom/app-store/_components/AppSettings";
@ -188,9 +189,10 @@ const querySchema = z.object({
category: z.nativeEnum(InstalledAppVariants), category: z.nativeEnum(InstalledAppVariants),
}); });
export default function InstalledApps({ category }: InferGetServerSidePropsType<typeof getServerSideProps>) { export default function InstalledApps() {
const { t } = useLocale(); const { t } = useLocale();
const router = useRouter();
const category = router.query.category;
return ( return (
<InstalledAppsLayout heading={t("installed_apps")} subtitle={t("manage_your_connected_apps")}> <InstalledAppsLayout heading={t("installed_apps")} subtitle={t("manage_your_connected_apps")}>
{(category === InstalledAppVariants.payment || category === InstalledAppVariants.conferencing) && ( {(category === InstalledAppVariants.payment || category === InstalledAppVariants.conferencing) && (