feat(WEB-36): improve typings

This commit is contained in:
Michael Zetterberg
2024-01-18 10:45:38 +01:00
parent 39b61c7691
commit 363580dac2
8 changed files with 35 additions and 18 deletions

View File

@@ -4,13 +4,17 @@ import path from "node:path";
import Header from "@/components/Current/Header";
import type { Params, SearchParams } from "@/types/params";
import type { PageArgs, LangParams, UriParams } from "@/types/params";
export default async function CurrentContentPage({
params,
searchParams,
}: Params<SearchParams>) {
}: PageArgs<LangParams, UriParams>) {
try {
if (!searchParams.uri) {
throw new Error("Bad URI");
}
const filePath = path.join(
process.cwd(),
"mockCms",