feat(WEB-36): improve typings
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -7,7 +7,7 @@ import Script from "next/script";
|
||||
import SkipToMainContent from "@/components/SkipToMainContent";
|
||||
|
||||
import type { Metadata } from "next";
|
||||
import type { Params } from "@/types/params";
|
||||
import type { LangParams, LayoutArgs } from "@/types/params";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
description: "New web",
|
||||
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
|
||||
export default function RootLayout({
|
||||
children,
|
||||
params,
|
||||
}: React.PropsWithChildren<Params>) {
|
||||
}: React.PropsWithChildren<LayoutArgs<LangParams>>) {
|
||||
return (
|
||||
<html lang={params.lang}>
|
||||
<head>
|
||||
|
||||
Reference in New Issue
Block a user