* create /(main-nav)/layout.tsx file that uses Shell * Add ShellMainAppDir that clones ShellMain but with client/server separation * event-types, availability, bookings * update pagesAndRewritePaths logic * fix --------- Co-authored-by: Peer Richelsen <peeroke@gmail.com>
23 lines
632 B
TypeScript
23 lines
632 B
TypeScript
"use client";
|
|
|
|
import { useRouter } from "next/navigation";
|
|
|
|
import type { LayoutProps } from "@calcom/features/shell/Shell";
|
|
import { Button } from "@calcom/ui";
|
|
|
|
export const ShellMainAppDirBackButton = ({ backPath }: { backPath: LayoutProps["backPath"] }) => {
|
|
const router = useRouter();
|
|
return (
|
|
<Button
|
|
variant="icon"
|
|
size="sm"
|
|
color="minimal"
|
|
onClick={() => (typeof backPath === "string" ? router.push(backPath as string) : router.back())}
|
|
StartIcon="arrow-left"
|
|
aria-label="Go Back"
|
|
className="rounded-md ltr:mr-2 rtl:ml-2"
|
|
data-testid="go-back-button"
|
|
/>
|
|
);
|
|
};
|