create-nextblock 0.2.43 → 0.2.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nextblock",
3
- "version": "0.2.43",
3
+ "version": "0.2.44",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -6,7 +6,6 @@ import type { Metadata } from 'next';
6
6
  import PageClientContent from "./PageClientContent";
7
7
  import { getPageDataBySlug } from "./page.utils";
8
8
  import BlockRenderer from "../../components/BlockRenderer";
9
- import type { HeroBlockContent } from '../../lib/blocks/blockRegistry';
10
9
  import { cookies, headers } from "next/headers";
11
10
 
12
11
  export const dynamicParams = true;
@@ -147,31 +146,13 @@ export default async function DynamicPage({ params: paramsPromise }: PageProps)
147
146
  }
148
147
  }
149
148
 
150
- let lcpImageUrl: string | null = null;
151
- const r2BaseUrl = process.env.NEXT_PUBLIC_R2_BASE_URL || "";
152
-
153
- if (pageData && pageData.blocks && r2BaseUrl) {
154
- const heroBlock = pageData.blocks.find(block => block.block_type === 'hero');
155
- if (heroBlock) {
156
- const heroContent = heroBlock.content as unknown as HeroBlockContent;
157
- if (
158
- heroContent.background &&
159
- heroContent.background.type === "image" &&
160
- heroContent.background.image &&
161
- heroContent.background.image.object_key
162
- ) {
163
- lcpImageUrl = `${r2BaseUrl}/${heroContent.background.image.object_key}`;
164
- }
165
- }
166
- }
149
+
167
150
 
168
151
  const pageBlocks = pageData ? <BlockRenderer blocks={pageData.blocks} languageId={pageData.language_id} /> : null;
169
152
 
170
153
  return (
171
154
  <>
172
- {lcpImageUrl && (
173
- <link rel="preload" as="image" href={lcpImageUrl} />
174
- )}
155
+
175
156
  <PageClientContent initialPageData={pageData} currentSlug={params.slug} translatedSlugs={translatedSlugs}>
176
157
  {pageBlocks}
177
158
  </PageClientContent>
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextblock-cms/template",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "next dev",