fix: fix data mapping for project
- rearrange structure in mapping
This commit is contained in:
@@ -70,15 +70,16 @@ const mapProfileData = (data: StrapiProfileComponent): Profile => {
|
||||
return {
|
||||
name: data.profile.name,
|
||||
title: data.profile.title,
|
||||
anchorId: data.profile.anchor_id,
|
||||
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 => {
|
||||
return {
|
||||
title: data.project.title,
|
||||
subtitle: data.project.subtitle,
|
||||
anchorId: data.project.anchor_id,
|
||||
entries: data.project.entries.map((entry) => ({
|
||||
title: entry.front_title,
|
||||
@@ -93,9 +94,9 @@ const mapProjectData = (data: StrapiProjectComponent): Projects => {
|
||||
|
||||
const mapSkillData = (data: StrapiSkillComponent): Skills => {
|
||||
return {
|
||||
anchorId: data.skill.anchor_id,
|
||||
subtitle: data.skill.subtitle,
|
||||
title: data.skill.title,
|
||||
subtitle: data.skill.subtitle,
|
||||
anchorId: data.skill.anchor_id,
|
||||
entries: data.skill.entries.map((entry) => ({
|
||||
title: entry.title,
|
||||
icon: entry.icon,
|
||||
|
||||
Reference in New Issue
Block a user