feat(SW-213): Use camelCase as prop

This commit is contained in:
Pontus Dreij
2024-09-19 10:21:01 +02:00
parent a49f4e5c94
commit d9d0fe5992
4 changed files with 7 additions and 5 deletions

View File

@@ -7,10 +7,10 @@ import styles from "./textcols.module.css"
import type { TextColsProps } from "@/types/components/content/blocks"
export default function TextCols({ text_cols }: TextColsProps) {
export default function TextCols({ textCols }: TextColsProps) {
return (
<div className={styles.columns}>
{text_cols.columns.map((col) => {
{textCols.columns.map((col) => {
return (
<div key={col.title} className={styles.column}>
<Subtitle>{col.title}</Subtitle>

View File

@@ -40,7 +40,7 @@ export function Blocks({ blocks }: BlocksProps) {
/>
)
case ContentBlocksTypenameEnum.ContentPageBlocksTextCols:
return <TextCols text_cols={block.text_cols} />
return <TextCols textCols={block.text_cols} />
default:
return null
}

View File

@@ -18,7 +18,9 @@ export type CardsGridProps = Pick<CardsGrid, "cards_grid"> & {
firstItem?: boolean
}
export type TextColsProps = Pick<TextCols, "text_cols">
export type TextColsProps = {
textCols: TextCols["text_cols"]
}
export type DynamicContentProps = {
dynamicContent: DynamicContent["dynamic_content"]

View File

@@ -84,7 +84,7 @@ export type CardsRaw = CardsGrid["cards_grid"]["cards"][number]
type TextColsRaw = z.infer<typeof contentPageTextCols>
export interface TextCols extends TextColsRaw {
text_cols: {
textCols: {
columns: {
title: string
text: {