Skip to content

Commit

Permalink
Fix react router v6 example
Browse files Browse the repository at this point in the history
  • Loading branch information
pavinduLakshan authored Aug 7, 2024
1 parent c86221a commit dc9e018
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ It's also possible to implement your own routing logic to secure the protected r

Create a reusable component that redirects user to the sign in page based on the authentication status.

**ProtectedRoute.js**
**ProtectedRoute.jsx**

```js
import { useAuthContext } from '@asgardeo/auth-react';
Expand Down Expand Up @@ -220,7 +220,7 @@ Use the `ProtectedRoute` as follows, in your route definition.

```js
import { AuthProvider } from '@asgardeo/auth-react'
import { Routes, Route } from 'react-router-dom'
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'
import ProtectedRoute from './components/ProtectedRoute'
import Home from './pages/Home'
import Dashboard from './pages/Dashboard'
Expand Down

0 comments on commit dc9e018

Please sign in to comment.