diff --git a/apps/strapi/prettier.config.mjs b/apps/strapi/prettier.config.mjs deleted file mode 100644 index d2690065..00000000 --- a/apps/strapi/prettier.config.mjs +++ /dev/null @@ -1,12 +0,0 @@ -import { prettierOptions } from "@repo/eslint-config/configs" - -/** - * Prettier configuration for Strapi must exclude the Tailwind plugin, - * otherwise generating types fails. - */ -export default { - ...prettierOptions, - plugins: prettierOptions.plugins.filter( - (p) => !String(p).includes("prettier-plugin-tailwindcss") - ), -} diff --git a/apps/strapi/src/api/blog-post/content-types/blog-post/schema.json b/apps/strapi/src/api/blog-post/content-types/blog-post/schema.json index ace3395c..f54eed41 100644 --- a/apps/strapi/src/api/blog-post/content-types/blog-post/schema.json +++ b/apps/strapi/src/api/blog-post/content-types/blog-post/schema.json @@ -73,13 +73,6 @@ "originalPublishedAt": { "type": "datetime" }, - "intro": { - "type": "dynamiczone", - "components": [ - "sections.disclaimer", - "sections.richtext" - ] - }, "content": { "type": "richtext" }, diff --git a/apps/strapi/src/documentMiddlewares/helpers.ts b/apps/strapi/src/documentMiddlewares/helpers.ts index e9185ea4..2e765ff8 100644 --- a/apps/strapi/src/documentMiddlewares/helpers.ts +++ b/apps/strapi/src/documentMiddlewares/helpers.ts @@ -142,7 +142,6 @@ export const getComponentsToPopulate = async ( action: string documentId: string | number locale?: string - params?: Record } ): Promise> => { const prefetchPopulate = buildDynamicZonePrefetchPopulate( @@ -151,18 +150,13 @@ export const getComponentsToPopulate = async ( dynamicZonePopulate ) - // Pass filters/status/pagination from the real request so we don't - // prefetch the whole collection on every blog-post page. const prefetchedData = await strapi .documents(context.uid) [context.action].call(this, { documentId: context.documentId, populate: prefetchPopulate, fields: ["documentId"], - locale: context.params?.locale ?? context.locale, - filters: context.params?.filters, - status: context.params?.status, - pagination: context.params?.pagination, + locale: context.locale, }) const entries = Array.isArray(prefetchedData) diff --git a/apps/strapi/types/generated/contentTypes.d.ts b/apps/strapi/types/generated/contentTypes.d.ts index 0242e149..10a7e110 100644 --- a/apps/strapi/types/generated/contentTypes.d.ts +++ b/apps/strapi/types/generated/contentTypes.d.ts @@ -525,9 +525,6 @@ export interface ApiBlogPostBlogPost extends Struct.CollectionTypeSchema { Schema.Attribute.Private description: Schema.Attribute.Text image: Schema.Attribute.Component<"media.image", false> - intro: Schema.Attribute.DynamicZone< - ["sections.disclaimer", "sections.richtext"] - > level: Schema.Attribute.Enumeration< ["beginner", "intermediate", "advanced"] > @@ -2189,7 +2186,6 @@ export interface PluginUsersPermissionsUser description: Schema.Attribute.Text email: Schema.Attribute.Email & Schema.Attribute.Required & - Schema.Attribute.Private & Schema.Attribute.SetMinMaxLength<{ minLength: 6 }> diff --git a/apps/ui/src/components/layouts/StrapiBlogPostView.tsx b/apps/ui/src/components/layouts/StrapiBlogPostView.tsx index 8a2fa7c3..c2167e71 100644 --- a/apps/ui/src/components/layouts/StrapiBlogPostView.tsx +++ b/apps/ui/src/components/layouts/StrapiBlogPostView.tsx @@ -63,7 +63,6 @@ export function StrapiBlogPostView({ params }: Props) { const sections = post.sections const author = post.author as BlogAuthor | null - const intro = post.intro const content = post.content const headings = content ? extractHeadings(content) : [] const hasManualRelated = (sections ?? []).some( @@ -110,17 +109,6 @@ export function StrapiBlogPostView({ params }: Props) {
- {intro && intro.length > 0 && ( -
- -
- )} - {content && (
diff --git a/apps/ui/src/lib/strapi-api/content/server.ts b/apps/ui/src/lib/strapi-api/content/server.ts index b6f0d345..e2dcc915 100644 --- a/apps/ui/src/lib/strapi-api/content/server.ts +++ b/apps/ui/src/lib/strapi-api/content/server.ts @@ -182,7 +182,7 @@ export async function fetchBlogPost( seo: seoPopulate, sidebar: { populate: ctaCardPopulate }, } as Record, - populateDynamicZone: { intro: true, sections: true }, + populateDynamicZone: { sections: true }, }, withCacheTags(dm.isEnabled, STRAPI_TAGS.blogPost, requestInit), options