fix: remove template
This commit is contained in:
@@ -2,5 +2,5 @@ CMS_ACCESS_TOKEN=""
|
|||||||
CMS_API_KEY=""
|
CMS_API_KEY=""
|
||||||
CMS_ENVIRONMENT="development"
|
CMS_ENVIRONMENT="development"
|
||||||
CMS_URL="https://eu-graphql.contentstack.com/stacks/${CMS_API_KEY}?environment=${CMS_ENVIRONMENT}"
|
CMS_URL="https://eu-graphql.contentstack.com/stacks/${CMS_API_KEY}?environment=${CMS_ENVIRONMENT}"
|
||||||
CMS_PREVIEW_URL="graphql-preview.contentstack.com/stacks/${CMS_API_KEY}?environment=${CMS_ENVIRONMENT}";
|
CMS_PREVIEW_URL="https://graphql-preview.contentstack.com/stacks/${CMS_API_KEY}?environment=${CMS_ENVIRONMENT}";
|
||||||
CMS_PREVIEW_TOKEN=""
|
CMS_PREVIEW_TOKEN=""
|
||||||
@@ -19,15 +19,17 @@ export default async function CurrentContentPage({
|
|||||||
searchParams,
|
searchParams,
|
||||||
}: PageArgs<LangParams, UriParams>) {
|
}: PageArgs<LangParams, UriParams>) {
|
||||||
try {
|
try {
|
||||||
console.log({ searchParams });
|
|
||||||
if (!searchParams.uri) {
|
if (!searchParams.uri) {
|
||||||
throw new Error("Bad URI")
|
throw new Error("Bad URI")
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await request<GetCurrentBlockPageData>(GetCurrentBlockPage, {
|
const response = await request<GetCurrentBlockPageData>(
|
||||||
locale: params.lang,
|
GetCurrentBlockPage,
|
||||||
url: searchParams.uri,
|
{
|
||||||
})
|
locale: params.lang,
|
||||||
|
url: searchParams.uri,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
if (!response.data?.all_current_blocks_page?.total) {
|
if (!response.data?.all_current_blocks_page?.total) {
|
||||||
console.log("#### DATA ####")
|
console.log("#### DATA ####")
|
||||||
@@ -45,13 +47,18 @@ export default async function CurrentContentPage({
|
|||||||
<>
|
<>
|
||||||
<Header lang={params.lang} pathname={searchParams.uri} />
|
<Header lang={params.lang} pathname={searchParams.uri} />
|
||||||
{images?.totalCount ? <Hero images={images.edges} /> : null}
|
{images?.totalCount ? <Hero images={images.edges} /> : null}
|
||||||
<main
|
<main className="main l-sections-wrapper" id="maincontent" role="main">
|
||||||
className="main l-sections-wrapper"
|
<input
|
||||||
id="maincontent"
|
id="lbl-personalized-areas"
|
||||||
role="main"
|
name="lbl-personalized-areas"
|
||||||
>
|
type="hidden"
|
||||||
<input id="lbl-personalized-areas" name="lbl-personalized-areas" type="hidden" value="" />
|
value=""
|
||||||
<SubnavMobile breadcrumbs={breadcrumbs} parent={parent} title={page.breadcrumbs.title} />
|
/>
|
||||||
|
<SubnavMobile
|
||||||
|
breadcrumbs={breadcrumbs}
|
||||||
|
parent={parent}
|
||||||
|
title={page.breadcrumbs.title}
|
||||||
|
/>
|
||||||
<Preamble
|
<Preamble
|
||||||
breadcrumbs={breadcrumbs}
|
breadcrumbs={breadcrumbs}
|
||||||
breadcrumbParent={parent}
|
breadcrumbParent={parent}
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
import Header from "@/components/Current/Header";
|
|
||||||
|
|
||||||
import type { LangParams, PageArgs, UriParams } from "@/types/params";
|
|
||||||
|
|
||||||
export default function CurrentContentpageTemplate({ children, params, searchParams }: React.PropsWithChildren<PageArgs<LangParams, UriParams>>) {
|
|
||||||
// if (!searchParams.uri) {
|
|
||||||
// throw new Error("Bad URI");
|
|
||||||
// }
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{/* <Header lang={params.lang} pathname={searchParams.uri} /> */}
|
|
||||||
{children}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -22,10 +22,6 @@ export default function RootLayout({
|
|||||||
return (
|
return (
|
||||||
<html lang={params.lang}>
|
<html lang={params.lang}>
|
||||||
<head>
|
<head>
|
||||||
{/* <Script
|
|
||||||
data-cookieconsent="ignore"
|
|
||||||
src="/Static/dist/js/head.js?85c84c9e24ae8da3e7af"
|
|
||||||
/> */}
|
|
||||||
<Script
|
<Script
|
||||||
data-cookieconsent="ignore"
|
data-cookieconsent="ignore"
|
||||||
src="/Static/dist/js/inline.js?00133e5a37de35c51a5d"
|
src="/Static/dist/js/inline.js?00133e5a37de35c51a5d"
|
||||||
@@ -46,11 +42,6 @@ export default function RootLayout({
|
|||||||
data-cookieconsent="ignore"
|
data-cookieconsent="ignore"
|
||||||
src="/Static/dist/js/ng/main.js?1705409330990"
|
src="/Static/dist/js/ng/main.js?1705409330990"
|
||||||
/>
|
/>
|
||||||
{/* <Script
|
|
||||||
data-cookieconsent="ignore"
|
|
||||||
src="/Static/dist/js/main-ng.js?336b801d6b38eff10884"
|
|
||||||
strategy="lazyOnload"
|
|
||||||
/> */}
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<InitLivePreview />
|
<InitLivePreview />
|
||||||
@@ -60,5 +51,5 @@ export default function RootLayout({
|
|||||||
<Footer lang={params.lang} />
|
<Footer lang={params.lang} />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user