2023-08-02 09:35:48 +00:00
|
|
|
import { usePathname } from "next/navigation";
|
2022-02-16 15:26:48 +00:00
|
|
|
|
|
|
|
export default function usePublicPage() {
|
2023-08-02 09:35:48 +00:00
|
|
|
const pathname = usePathname();
|
2022-11-29 20:27:29 +00:00
|
|
|
const isPublicPage = ["/[user]", "/booking", "/cancel", "/reschedule"].find((route) =>
|
2023-08-02 09:35:48 +00:00
|
|
|
pathname?.startsWith(route)
|
2022-02-16 15:26:48 +00:00
|
|
|
);
|
|
|
|
return isPublicPage;
|
|
|
|
}
|