fix(web): remove redundant prop-types and unblock lint pipeline
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 10s
Build & Deploy / 🧪 QA (push) Failing after 2m24s
Build & Deploy / 🏗️ Build (push) Failing after 3m40s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 3s
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 10s
Build & Deploy / 🧪 QA (push) Failing after 2m24s
Build & Deploy / 🏗️ Build (push) Failing after 3m40s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 3s
This commit is contained in:
52
apps/web/src/payload/blocks/WebVitalsScoreBlock.ts
Normal file
52
apps/web/src/payload/blocks/WebVitalsScoreBlock.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import { MintelBlock } from "./types";
|
||||
|
||||
import type { Block } from "payload";
|
||||
|
||||
export const WebVitalsScoreBlock: MintelBlock = {
|
||||
slug: "webVitalsScore",
|
||||
labels: {
|
||||
singular: "Web Vitals Score",
|
||||
plural: "Web Vitals Scores",
|
||||
},
|
||||
admin: {
|
||||
group: "MDX Components",
|
||||
},
|
||||
ai: {
|
||||
name: "WebVitalsScore",
|
||||
description:
|
||||
"Displays Core Web Vitals (LCP, INP, CLS) in a premium card layout with automatic traffic light coloring (Good/Needs Improvement/Poor). Use for performance audits or comparisons.",
|
||||
usageExample: "'<WebVitalsScore values={{ lcp: 2.5, inp: 200, cls: 0.1",
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: "lcp",
|
||||
type: "number",
|
||||
required: true,
|
||||
admin: { description: "Largest Contentful Paint (s)" },
|
||||
},
|
||||
{
|
||||
name: "inp",
|
||||
type: "number",
|
||||
required: true,
|
||||
admin: { description: "Interaction to Next Paint (ms)" },
|
||||
},
|
||||
{
|
||||
name: "cls",
|
||||
type: "number",
|
||||
required: true,
|
||||
admin: { description: "Cumulative Layout Shift" },
|
||||
},
|
||||
{
|
||||
name: "description",
|
||||
type: "text",
|
||||
admin: {
|
||||
components: {
|
||||
afterInput: [
|
||||
"@/src/payload/components/FieldGenerators/AiFieldButton#AiFieldButton",
|
||||
],
|
||||
},
|
||||
description: "Geben Sie den Text für description ein.",
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user