@@ -0,0 +1,14 @@
+import React from "react";
+import { notFound } from "next/navigation";
+
+import { isValidDayParam } from "@/lib/frontend/params";
+export default async function DayLayout({ children, params }) {
+ const { day } = await params;
+ if (!isValidDayParam(day)) {
+ notFound();
+ }
+ return children;
+}
+import { isValidMonthParam } from "@/lib/frontend/params";
+export default async function MonthLayout({ children, params }) {
+ const { month } = await params;
+ if (!isValidMonthParam(month)) {
+import { isValidYearParam } from "@/lib/frontend/params";
+export default async function YearLayout({ children, params }) {
+ const { year } = await params;
+ if (!isValidYearParam(year)) {
@@ -0,0 +1,15 @@
+import BranchGuard from "@/components/auth/BranchGuard";
+import { isValidBranchParam } from "@/lib/frontend/params";
+export default async function BranchLayout({ children, params }) {
+ const { branch } = await params;
+ if (!isValidBranchParam(branch)) {
+ return <BranchGuard branch={branch}>{children}</BranchGuard>;