Skip to content

Commit 6981674

Browse files
committed
Add fileName to profile data in ProfilePage component
1 parent 1df6203 commit 6981674

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/Profile/ProfilePage.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ const ProfilePage = () => {
2828
}
2929
const response = await fetch(`/data/${profileFile}`);
3030
const data = await response.json();
31-
setProfileData(data);
31+
// Add fileName (without .json) to the profile data
32+
setProfileData({ ...data, fileName: profileFile.replace('.json', '') });
3233
} catch (error) {
3334
console.error('Error fetching profile data:', error);
3435
} finally {

0 commit comments

Comments
 (0)