fix: cleanup

This commit is contained in:
Christel Westerberg
2024-02-13 16:06:37 +01:00
parent 4b193541b2
commit 367dffc41d
7 changed files with 21 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
import { previewRequest } from "@/lib/previewRequest"
import { GetCurrentBlockPage } from "@/lib/graphql/Query/CurrentBlockPage.graphql"
import type { PageArgs, LangParams, UriParams } from "@/types/params"
import type { PageArgs, LangParams, PreviewParams } from "@/types/params"
import type { GetCurrentBlockPageData } from "@/types/requests/currentBlockPage"
import ContentstackLivePreview from "@contentstack/live-preview-utils"
import LoadingSpinner from "@/components/Current/LoadingSpinner"
@@ -10,11 +10,11 @@ import ContentPage from "@/components/Current/ContentPage"
export default async function CurrentContentPage({
params,
searchParams,
}: PageArgs<LangParams, UriParams>) {
}: PageArgs<LangParams, PreviewParams>) {
try {
ContentstackLivePreview.setConfigFromParams(searchParams)
if (!searchParams.uri || !searchParams["live_preview"]) {
if (!searchParams.uri || !searchParams.live_preview) {
return <LoadingSpinner />
}