fix: cleanup
This commit is contained in:
@@ -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 />
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user