Skip to content

Commit b1c489b

Browse files
committed
projects refactor
1 parent 8031f1a commit b1c489b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/utils/projectParser.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ export const useProjects = () => {
88
useEffect(() => {
99
const fetchProjects = async () => {
1010
try {
11-
const response = await fetch('/projects/shownProjects.json');
11+
const response = await fetch('/projects/projects.json');
1212
if (!response.ok) {
1313
throw new Error(
14-
`HTTP error! status: ${response.status} for shownProjects.json`,
14+
`HTTP error! status: ${response.status} for projects.json`,
1515
);
1616
}
1717
const projectDataList = await response.json();
1818

1919
const fetchedProjects = await Promise.all(
2020
projectDataList.map(async (projectData) => {
21-
const slug = projectData.slug; // Use slug from shownProjects.json
21+
const slug = projectData.slug; // Use slug from projects.json
2222
const contentResponse = await fetch(`/projects/${slug}.txt`);
2323
if (!contentResponse.ok) {
2424
throw new Error(
@@ -33,7 +33,7 @@ export const useProjects = () => {
3333
const fullContent = parts.slice(1).join('---').trim();
3434

3535
return {
36-
...projectData, // All metadata from shownProjects.json
36+
...projectData, // All metadata from projects.json
3737
shortDescription,
3838
fullContent,
3939
};

0 commit comments

Comments
 (0)