Skip to content

Commit

Permalink
Real last
Browse files Browse the repository at this point in the history
  • Loading branch information
jylim-dev committed Jan 23, 2025
1 parent 0296147 commit 0463711
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
import { BrowserRouter as Router, Route, Routes, Link } from "react-router-dom";
import dayjs from "dayjs";
import ViewPost from "./ViewPost";
// import ViewPost from "./ViewPost";

function App() {
const [posts, setPosts] = useState([]);
Expand All @@ -15,9 +15,9 @@ function App() {
const postPromises = Object.keys(postFiles).map(async (filePath) => {
console.log("Patttthhh", filePath);
const date = dayjs(
filePath.split("/")[2].split("-").slice(0, 3).join("-")
filePath.split("/")[3].split("-").slice(0, 3).join("-")
);
const player = filePath.split("/")[2].split("-").slice(-1);
const player = filePath.split("/")[3].split("-").slice(-1);
return { filePath, date, player };
});

Expand Down Expand Up @@ -48,7 +48,7 @@ function App() {
</div>
}
/>
<Route path="/:filePath" element={<ViewPost />} />
{/* <Route path="/:filePath" element={<ViewPost />} /> */}
</Routes>
</Router>
);
Expand Down

0 comments on commit 0463711

Please sign in to comment.