Skip to content

Commit

Permalink
linked post card "view" button to the post page
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackson-Williams-15 committed Dec 5, 2023
1 parent 787a9d3 commit 48d3537
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions FU.SPA/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Create from './components/pages/Create';
import NoPage from './components/pages/NoPage';
import SignIn from './components/pages/SignIn';
import SignUp from './components/pages/SignUp';
import PostPage from './components/pages/PostPage';

import { Route, Routes } from 'react-router-dom';
function App() {
Expand All @@ -20,6 +21,7 @@ function App() {
<Route path="/create" element={<Create />} />
<Route path="/signup" element={<SignUp />} />
<Route path="/signin" element={<SignIn />} />
<Route path="/posts" element={<PostPage />} />
<Route path="*" element={<NoPage />} />
</Routes>
</div>
Expand Down
4 changes: 3 additions & 1 deletion FU.SPA/src/components/PostCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ const PostCard = ({ post }) => {
</div>
</CardContent>
<CardActions>
<Button size="large">View</Button>
<Button size="large">
<Link to={'/posts'}>View</Link>
</Button>
</CardActions>
</Card>
);
Expand Down

0 comments on commit 48d3537

Please sign in to comment.