Skip to content

Commit

Permalink
Update README.md (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
ederssouza authored Aug 25, 2023
1 parent b3bc617 commit 67b0a0f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ import { PublicRoute } from 'src/router/PublicRoute'

const SampleComponent = () => <div>Sample component</div>

export const Routes = () => (
export const Router = () => (
<Routes>
<PublicRoute
path="/login"
Expand All @@ -174,7 +174,7 @@ import { PrivateRoute } from 'src/router/PrivateRoute'

const SampleComponent = () => <div>Sample component</div>

export const Routes = () => (
export const Router = () => (
<Routes>
{/*
allow route access if the user has the permissions
Expand All @@ -194,12 +194,11 @@ export const Routes = () => (
The route can be accessed if a user is authenticated or not. Use `Route` component.

```tsx
import { Routes } from 'react-router-dom'
import { PrivateRoute } from 'src/router/PrivateRoute'
import { Route, Routes } from 'react-router-dom'

const SampleComponent = () => <div>Sample component</div>

export const Routes = () => (
export const Router = () => (
<Routes>
<Route path="/contact" element={<SampleComponent />} />
</Routes>
Expand Down

0 comments on commit 67b0a0f

Please sign in to comment.