Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: Bailey Pumfleet <[email protected]> Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: Hariom Balhara <[email protected]>
10 lines
275 B
TypeScript
10 lines
275 B
TypeScript
import { usePathname } from "next/navigation";
|
|
|
|
export default function usePublicPage() {
|
|
const pathname = usePathname();
|
|
const isPublicPage = ["/[user]", "/booking", "/cancel", "/reschedule"].find((route) =>
|
|
pathname?.startsWith(route)
|
|
);
|
|
return isPublicPage;
|
|
}
|