Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Commit

Permalink
chore: remove unused routes in main app
Browse files Browse the repository at this point in the history
  • Loading branch information
virtuoushub committed Apr 2, 2022
1 parent 4ae09e9 commit 53637f8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 44 deletions.
5 changes: 0 additions & 5 deletions web/src/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ import BlogLayout from 'src/layouts/BlogLayout'
const Routes = () => {
return (
<Router>
<Route path="/login" page={LoginPage} name="login" />
<Route path="/signup" page={SignupPage} name="signup" />
<Route path="/forgot-password" page={ForgotPasswordPage} name="forgotPassword" />
<Route path="/reset-password" page={ResetPasswordPage} name="resetPassword" />
<Private unauthenticated="home">
<Set wrap={PostsLayout}>
<Route path="/admin/posts/new" page={PostNewPostPage} name="newPost" />
Expand All @@ -29,7 +25,6 @@ const Routes = () => {

<Set wrap={BlogLayout}>
<Route path="/article/{id:Int}" page={ArticlePage} name="article" />
<Route path="/contact" page={ContactPage} name="contact" />
<Route path="/about" page={AboutPage} name="about" />
<Route path="/" page={HomePage} name="home" />
</Set>
Expand Down
21 changes: 0 additions & 21 deletions web/src/layouts/BlogLayout/BlogLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,6 @@ const BlogLayout = ({ children }) => {
About
</Link>
</li>
<li>
<Link
className="py-2 px-4 hover:bg-blue-600 transition duration-100 rounded"
to={routes.contact()}
>
Contact
</Link>
</li>
<li>
{isAuthenticated ? (
<div>
<button className="py-2 px-4" type="button" onClick={logOut}>
Logout
</button>
</div>
) : (
<Link className="py-2 px-4" to={routes.login()}>
Login
</Link>
)}
</li>
</ul>
{isAuthenticated && (
<div className="absolute bottom-1 right-0 mr-12 text-xs text-blue-300">
Expand Down
2 changes: 0 additions & 2 deletions web/src/layouts/BlogLayout/BlogLayout.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ generated.play = async ({ canvasElement }) => {
expect(heading).toHaveTextContent('Redwood Blog')
const aboutLink = await canvas.findByRole('link', { name: 'About' })
expect(aboutLink).toHaveTextContent('About')
const homeLink = await canvas.findByRole('link', { name: 'Contact' })
expect(homeLink).toHaveTextContent('Contact')
}

export default {
Expand Down
16 changes: 0 additions & 16 deletions web/src/layouts/BlogLayout/__snapshots__/BlogLayout.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,6 @@ exports[`BlogLayout fragment matches snapshot 1`] = `
About
</a>
</li>
<li>
<a
class="py-2 px-4 hover:bg-blue-600 transition duration-100 rounded"
href="/contact"
>
Contact
</a>
</li>
<li>
<a
class="py-2 px-4"
href="/login"
>
Login
</a>
</li>
</ul>
</nav>
</header>
Expand Down

0 comments on commit 53637f8

Please sign in to comment.