Private
Public Access
1
0

fix: fix data mapping for project

- rearrange structure in mapping
This commit is contained in:
Adrian Fennert
2026-02-13 11:31:51 +01:00
parent 7249cbde25
commit 51793fc24a

View File

@@ -70,15 +70,16 @@ const mapProfileData = (data: StrapiProfileComponent): Profile => {
return { return {
name: data.profile.name, name: data.profile.name,
title: data.profile.title, title: data.profile.title,
anchorId: data.profile.anchor_id,
text: data.profile.description, text: data.profile.description,
imageUrl: publicEnv.PUBLIC_STRAPI_URL + data.profile.image.formats.small.url imageUrl: publicEnv.PUBLIC_STRAPI_URL + data.profile.image.formats.small.url,
anchorId: data.profile.anchor_id
}; };
}; };
const mapProjectData = (data: StrapiProjectComponent): Projects => { const mapProjectData = (data: StrapiProjectComponent): Projects => {
return { return {
title: data.project.title, title: data.project.title,
subtitle: data.project.subtitle,
anchorId: data.project.anchor_id, anchorId: data.project.anchor_id,
entries: data.project.entries.map((entry) => ({ entries: data.project.entries.map((entry) => ({
title: entry.front_title, title: entry.front_title,
@@ -93,9 +94,9 @@ const mapProjectData = (data: StrapiProjectComponent): Projects => {
const mapSkillData = (data: StrapiSkillComponent): Skills => { const mapSkillData = (data: StrapiSkillComponent): Skills => {
return { return {
anchorId: data.skill.anchor_id,
subtitle: data.skill.subtitle,
title: data.skill.title, title: data.skill.title,
subtitle: data.skill.subtitle,
anchorId: data.skill.anchor_id,
entries: data.skill.entries.map((entry) => ({ entries: data.skill.entries.map((entry) => ({
title: entry.title, title: entry.title,
icon: entry.icon, icon: entry.icon,