chore: app router - /bookings status page (#18183)

* chore: app router - /bookings page

* remove env vars

* fix

* Update middleware.ts

* revert unneeded change

* refactor for the better

* fix
This commit is contained in:
Benny Joo authored and GitHub committed 2024-12-23 10:12:22 +01:00
1 parent 3eda7858c0
commit 542799e2cf
10 files changed
+35 -89

No files matched your search

@@ -1,25 +0,0 @@
import { withAppDirSsg } from "app/WithAppDirSsg";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import type { InferGetStaticPropsType } from "next";
import { validStatuses } from "~/bookings/lib/validStatuses";
import Page from "~/bookings/views/bookings-listing-view";
import { getStaticProps } from "~/bookings/views/bookings-listing-view.getStaticProps";
type Y = InferGetStaticPropsType<typeof getStaticProps>;
const getData = withAppDirSsg<Y>(getStaticProps, "future/bookings/[status]");
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("bookings"),
(t) => t("bookings_description")
);
export const generateStaticParams = async () => {
return validStatuses.map((status) => ({ status }));
};
export default WithLayout({ getLayout: null, getData, Page })<"P">;
export const dynamic = "force-static";