fix: Revert - chore: app router - all sub-pages in /apps #16976 (#18702)

* revert

* add incomplete-booking
This commit is contained in:
Benny Joo authored and GitHub committed 2025-01-15 21:12:18 -03:00
1 parent b128579729
commit ce87de4fc7
69 files changed
+567 -555

No files matched your search

+6 -9
View File
@@ -25,7 +25,7 @@ import { useAppTheme } from "./useAppTheme";
const Layout = (props: LayoutProps) => {
const { banners, bannersHeight } = useBanners();
const pathname = usePathname();
const isFullPageWithoutSidebar = pathname?.startsWith("/routing/reporting/");
const isFullPageWithoutSidebar = pathname?.startsWith("/apps/routing-forms/reporting/");
const pageTitle = typeof props.heading === "string" && !props.title ? props.heading : props.title;
const withoutSeo = props.withoutSeo ?? props.withoutMain ?? false;
@@ -138,26 +138,23 @@ export function ShellMain(props: LayoutProps) {
const { buttonToShow, isLoading, enableNotifications, disableNotifications } = useNotifications();
const backPath = props.backPath;
// Replace multiple leading slashes with a single slash
// e.g., `//routing/forms` -> `/routing/forms`
const validBackPath = typeof backPath === "string" ? backPath.replace(/^\/+/, "/") : null;
return (
<>
{(props.heading || !!backPath) && (
{(props.heading || !!props.backPath) && (
<div
className={classNames(
"flex items-center md:mb-6 md:mt-0",
props.smallHeading ? "lg:mb-7" : "lg:mb-8",
props.hideHeadingOnMobile ? "mb-0" : "mb-6"
)}>
{!!backPath && (
{!!props.backPath && (
<Button
variant="icon"
size="sm"
color="minimal"
onClick={() => (validBackPath ? router.push(validBackPath) : router.back())}
onClick={() =>
typeof props.backPath === "string" ? router.push(props.backPath as string) : router.back()
}
StartIcon="arrow-left"
aria-label="Go Back"
className="rounded-md ltr:mr-2 rtl:ml-2"
@@ -87,10 +87,10 @@ const getNavigationItems = (orgBranding: OrganizationBranding): NavigationItemTy
icon: "ellipsis",
},
{
name: "routing",
href: "/routing/forms",
icon: "split",
isCurrent: ({ pathname }) => pathname?.startsWith("/routing/forms") ?? false,
name: "routing_forms",
href: "/apps/routing-forms/forms",
icon: "file-text",
isCurrent: ({ pathname }) => pathname?.startsWith("/apps/routing-forms/") ?? false,
moreOnMobile: true,
},
{