Skip to content

Commit 67b0a0f

Browse files
authored
Update README.md (#18)
1 parent b3bc617 commit 67b0a0f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ import { PublicRoute } from 'src/router/PublicRoute'
154154

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

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

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

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

196196
```tsx
197-
import { Routes } from 'react-router-dom'
198-
import { PrivateRoute } from 'src/router/PrivateRoute'
197+
import { Route, Routes } from 'react-router-dom'
199198

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

202-
export const Routes = () => (
201+
export const Router = () => (
203202
<Routes>
204203
<Route path="/contact" element={<SampleComponent />} />
205204
</Routes>

0 commit comments

Comments
 (0)