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>
This commit is contained in:
Hariom Balhara
2022-10-18 08:46:06 +00:00
committed by GitHub
co-authored by zomars
parent d0d793a719
commit 2e169801e8
+4 -2
View File
@@ -1,4 +1,5 @@
import { InferGetServerSidePropsType } from "next";
import { useRouter } from "next/router";
import z from "zod";
import { AppSettings } from "@calcom/app-store/_components/AppSettings";
@@ -188,9 +189,10 @@ const querySchema = z.object({
category: z.nativeEnum(InstalledAppVariants),
});
export default function InstalledApps({ category }: InferGetServerSidePropsType<typeof getServerSideProps>) {
export default function InstalledApps() {
const { t } = useLocale();
const router = useRouter();
const category = router.query.category;
return (
<InstalledAppsLayout heading={t("installed_apps")} subtitle={t("manage_your_connected_apps")}>
{(category === InstalledAppVariants.payment || category === InstalledAppVariants.conferencing) && (