We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1df6203 commit 6981674Copy full SHA for 6981674
1 file changed
src/components/Profile/ProfilePage.jsx
@@ -28,7 +28,8 @@ const ProfilePage = () => {
28
}
29
const response = await fetch(`/data/${profileFile}`);
30
const data = await response.json();
31
- setProfileData(data);
+ // Add fileName (without .json) to the profile data
32
+ setProfileData({ ...data, fileName: profileFile.replace('.json', '') });
33
} catch (error) {
34
console.error('Error fetching profile data:', error);
35
} finally {
0 commit comments