From b6cef49ee60461dcc391826585858b59a7ae069b Mon Sep 17 00:00:00 2001 From: Bailey Pumfleet Date: Thu, 24 Oct 2024 17:18:38 -0400 Subject: [PATCH] fix: app store title (#17307) * Fix app store title * refactor apps-view * revert unneeded changes * remove withoutMain --------- Co-authored-by: Benny Joo --- apps/web/app/future/apps/page.tsx | 3 +-- apps/web/components/apps/layouts/AppsLayout.tsx | 8 ++++---- apps/web/modules/apps/apps-view.tsx | 15 --------------- apps/web/pages/apps/index.tsx | 3 +-- 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/apps/web/app/future/apps/page.tsx b/apps/web/app/future/apps/page.tsx index 6334d61e4a..7509cfb5fd 100644 --- a/apps/web/app/future/apps/page.tsx +++ b/apps/web/app/future/apps/page.tsx @@ -4,7 +4,7 @@ import { WithLayout } from "app/layoutHOC"; import { getServerSideProps } from "@lib/apps/getServerSideProps"; -import AppsPage, { LayoutWrapper } from "~/apps/apps-view"; +import AppsPage from "~/apps/apps-view"; export const generateMetadata = async () => { return await _generateMetadata( @@ -14,7 +14,6 @@ export const generateMetadata = async () => { }; export default WithLayout({ - getLayout: LayoutWrapper, getData: withAppDirSsr(getServerSideProps), Page: AppsPage, }); diff --git a/apps/web/components/apps/layouts/AppsLayout.tsx b/apps/web/components/apps/layouts/AppsLayout.tsx index a382d88cea..55586a2297 100644 --- a/apps/web/components/apps/layouts/AppsLayout.tsx +++ b/apps/web/components/apps/layouts/AppsLayout.tsx @@ -3,7 +3,7 @@ import { useRouter } from "next/navigation"; import type { ComponentProps } from "react"; import React from "react"; -import { ShellMain } from "@calcom/features/shell/Shell"; +import Shell from "@calcom/features/shell/Shell"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { EmptyScreen } from "@calcom/ui"; @@ -11,7 +11,7 @@ type AppsLayoutProps = { children: React.ReactNode; actions?: (className?: string) => JSX.Element; emptyStore?: boolean; -} & Omit, "actions">; +} & Omit, "actions">; export default function AppsLayout({ children, actions, emptyStore, ...rest }: AppsLayoutProps) { const { t } = useLocale(); @@ -21,7 +21,7 @@ export default function AppsLayout({ children, actions, emptyStore, ...rest }: A if (session.status === "loading") return <>; return ( - +
{emptyStore ? ( @@ -37,6 +37,6 @@ export default function AppsLayout({ children, actions, emptyStore, ...rest }: A )}
-
+ ); } diff --git a/apps/web/modules/apps/apps-view.tsx b/apps/web/modules/apps/apps-view.tsx index bf5eacc787..411ee415ed 100644 --- a/apps/web/modules/apps/apps-view.tsx +++ b/apps/web/modules/apps/apps-view.tsx @@ -3,7 +3,6 @@ import type { ChangeEventHandler } from "react"; import { useState } from "react"; -import Shell from "@calcom/features/shell/Shell"; import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { inferSSRProps } from "@calcom/types/inferSSRProps"; @@ -96,17 +95,3 @@ export default function Apps({ categories, appStore, userAdminTeams }: PageProps ); } - -export const LayoutWrapper = (page: React.ReactElement) => { - const { t } = useLocale(); - - return ( - - {page} - - ); -}; diff --git a/apps/web/pages/apps/index.tsx b/apps/web/pages/apps/index.tsx index 60dfa237b9..37a72233bc 100644 --- a/apps/web/pages/apps/index.tsx +++ b/apps/web/pages/apps/index.tsx @@ -3,12 +3,11 @@ import { getServerSideProps } from "@lib/apps/getServerSideProps"; import PageWrapper from "@components/PageWrapper"; import type { PageProps } from "~/apps/apps-view"; -import Apps, { LayoutWrapper } from "~/apps/apps-view"; +import Apps from "~/apps/apps-view"; const Page = (props: PageProps) => ; Page.PageWrapper = PageWrapper; -Page.getLayout = LayoutWrapper; export { getServerSideProps };