fix: resolve rich text rendering and data mapping issues
Hardened rich text conversion logic to handle malformed Tiptap documents and added null checks for CMS data in About section.
This commit is contained in:
@@ -118,8 +118,8 @@ const About = () => {
|
||||
description="Tools & Technologies"
|
||||
header={
|
||||
<div className="flex flex-wrap gap-2 p-2 overflow-y-auto max-h-40 scrollbar-hide">
|
||||
{techStack.length > 0 ? (
|
||||
techStack.flatMap(cat => cat.items.map((item: any) => (
|
||||
{techStack && techStack.length > 0 ? (
|
||||
techStack.flatMap(cat => cat.items?.map((item: any) => (
|
||||
<motion.span
|
||||
key={item.id}
|
||||
whileHover={{ scale: 1.05 }}
|
||||
@@ -184,7 +184,7 @@ const About = () => {
|
||||
description="Beyond the screen"
|
||||
header={
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-3 mt-2">
|
||||
{hobbies.length > 0 ? hobbies.map((hobby, i) => {
|
||||
{hobbies && hobbies.length > 0 ? hobbies.map((hobby, i) => {
|
||||
const Icon = iconMap[hobby.icon] || Lightbulb;
|
||||
return (
|
||||
<motion.div
|
||||
|
||||
Reference in New Issue
Block a user