Skip to content

Commit 6367490

Browse files
committed
fix: resolve hydration error by fixing invalid HTML nesting
- Fix PageHero component HTML structure: - Change motion.p to motion.div for description element - Prevents invalid HTML nesting: <p> cannot contain <div> - BlurReveal component renders a <div>, which is invalid inside <p> - This was causing hydration errors and console warnings - Problem solved: - Eliminates 'div cannot be a descendant of p' error - Fixes hydration mismatch between server and client - Maintains same visual styling and animations - All hero sections now render without console errors - Technical details: - <p> tags can only contain inline elements - <div> is a block element, invalid inside <p> - motion.div provides same functionality as motion.p - CSS classes remain identical for consistent styling
1 parent bf6e39e commit 6367490

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/ui/PageHero.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function PageHero({
5555
</BlurReveal>
5656
</motion.h1>
5757

58-
<motion.p
58+
<motion.div
5959
initial={{ opacity: 0, y: 30 }}
6060
animate={{ opacity: 1, y: 0 }}
6161
transition={{ duration: 0.8, delay: 0.4, ease: 'easeOut' }}
@@ -64,7 +64,7 @@ export function PageHero({
6464
<BlurReveal duration={600}>
6565
{description}
6666
</BlurReveal>
67-
</motion.p>
67+
</motion.div>
6868
</div>
6969
</section>
7070
);

0 commit comments

Comments
 (0)