feat(SW-66, SW-348): search functionality and ui
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import ContentstackLivePreview from "@contentstack/live-preview-utils"
|
||||
|
||||
import { previewRequest } from "@/lib/graphql/previewRequest"
|
||||
import { GetCurrentBlockPage } from "@/lib/graphql/Query/CurrentBlockPage.graphql"
|
||||
import { GetCurrentBlockPage } from "@/lib/graphql/Query/Current/CurrentBlockPage.graphql"
|
||||
|
||||
import ContentPage from "@/components/Current/ContentPage"
|
||||
import LoadingSpinner from "@/components/Current/LoadingSpinner"
|
||||
import { getLang, setLang } from "@/i18n/serverContext"
|
||||
import { setLang } from "@/i18n/serverContext"
|
||||
|
||||
import type { PageArgs, PreviewParams } from "@/types/params"
|
||||
import { LangParams } from "@/types/params"
|
||||
@@ -26,7 +26,7 @@ export default async function CurrentPreviewPage({
|
||||
|
||||
const response = await previewRequest<GetCurrentBlockPageData>(
|
||||
GetCurrentBlockPage,
|
||||
{ locale: getLang(), url: searchParams.uri }
|
||||
{ locale: params.lang, url: searchParams.uri }
|
||||
)
|
||||
|
||||
if (!response.data?.all_current_blocks_page?.total) {
|
||||
|
||||
Reference in New Issue
Block a user