Skip to content

Commit

Permalink
name
Browse files Browse the repository at this point in the history
  • Loading branch information
jylim-dev committed Jan 24, 2025
1 parent 36e49bf commit 281e5e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ function App() {
const date = dayjs(
filePath.split("/")[3].split("-").slice(0, 3).join("-")
);
const player = filePath.split("/")[3].split("-").slice(-1);
const player = filePath.split("/")[3].split("-").slice(-1)[0];
console.log({ filePath, date, player });
return { filePath, date, player };
});

const posts = await Promise.all(postPromises);
posts.sort((a, b) => b.date - a.date);
console.log(posts);
setPosts(posts);
};

Expand Down

0 comments on commit 281e5e7

Please sign in to comment.