Skip to content

Commit

Permalink
fix: routing
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanlao committed Apr 30, 2024
1 parent edda31f commit 2c69d1a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import './App.css';

const router = createBrowserRouter([
{
path: '/',
path: '/but-how-do-I/',
element: <Home />
},
{
path: '/post/:title',
path: '/but-how-do-I/post/:title',
element: (
<FadeInWrapper>
<Post />
Expand Down
2 changes: 1 addition & 1 deletion src/components/PostGrid/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const PostGrid = ({ title, tags }) => {
}, [tags]);

return (
<Link to={`/post/${title}`}>
<Link to={`/but-how-do-I/post/${title}`}>
<div
className="
w-4/5
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Post/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const Post = () => {
dangerouslySetInnerHTML={{ __html: rawHTMLContent }}
/>
</div>
<Link to="/">
<Link to="/but-how-do-I/">
<div
className="
fixed
Expand Down
3 changes: 3 additions & 0 deletions src/posts/How Do I Implement Pagination in React.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<post>
<p>Coming soon..</p>
</post>
3 changes: 3 additions & 0 deletions src/posts/How Do I Use Scroll, Blur and Opactiy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<post>
<p>Coming soon..</p>
</post>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<post>
<p>Coming soon..</p>
</post>

0 comments on commit 2c69d1a

Please sign in to comment.