Skip to content

Commit d732098

Browse files
committed
feat: remove unnecessary migrations
1 parent 528e2c8 commit d732098

12 files changed

Lines changed: 1007 additions & 1387 deletions

src/blocks/SwipeCardBlock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ export const SwipeCardBlock: Block = {
1010
{
1111
name: "heading",
1212
type: "text",
13-
required: true,
13+
required: false,
1414
localized: true,
1515
},
1616
{
1717
name: "subheading",
1818
type: "textarea",
19-
required: true,
19+
required: false,
2020
localized: true,
2121
},
2222
{

src/components/sections/SwipeCardSection.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ export function SwipeCardSection({ content }: SwipeCardSectionProps) {
1818
const [focusedIndex, setFocusedIndex] = useState(0)
1919
const { trigger } = useWebHaptics()
2020

21-
if (!content?.heading || !content?.subheading || !content?.cards?.length) return null
21+
if (!content?.cards?.length) return null
2222

2323
const cards = content.cards
24+
const hasHeader = Boolean(content.heading || content.subheading)
2425

2526
const handlePrevious = () => {
2627
trigger("light")
@@ -90,14 +91,20 @@ export function SwipeCardSection({ content }: SwipeCardSectionProps) {
9091
whileInView="show"
9192
viewport={{ once: true, amount: 0.2 }}
9293
>
93-
<motion.div className="flex flex-col items-center gap-4 text-center" variants={staggerItem}>
94-
<h2 className="text-4xl font-semibold text-white">
95-
{content.heading}
96-
</h2>
97-
<p className="relative z-10 max-w-[90vw] lg:w-1/2 text-center font-medium text-white/75 text-xl">
98-
{content.subheading}
99-
</p>
100-
</motion.div>
94+
{hasHeader && (
95+
<motion.div className="flex flex-col items-center gap-4 text-center" variants={staggerItem}>
96+
{content.heading && (
97+
<h2 className="text-4xl font-semibold text-white">
98+
{content.heading}
99+
</h2>
100+
)}
101+
{content.subheading && (
102+
<p className="relative z-10 max-w-[90vw] lg:w-1/2 text-center font-medium text-white/75 text-xl">
103+
{content.subheading}
104+
</p>
105+
)}
106+
</motion.div>
107+
)}
101108

102109
<motion.div className="relative w-full overflow-hidden" variants={carouselVariants}>
103110
<div aria-hidden="true" className="pointer-events-none absolute -inset-y-6 left-0 z-30 w-0 bg-linear-to-r from-primary via-primary/80 to-transparent lg:w-40" />

src/migrations/20260427_010_remove_edition_hero_block.ts

Lines changed: 987 additions & 0 deletions
Large diffs are not rendered by default.

src/migrations/20260428_011_card_row_block.ts

Lines changed: 0 additions & 224 deletions
This file was deleted.

0 commit comments

Comments
 (0)