Skip to content

Commit

Permalink
Fixed PR Preview auto redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
samarth52 committed Oct 21, 2023
1 parent 2c1b75e commit 0ab21fe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/RouterComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ import App from '../App';
import InviteBackLink from '../InviteBackLink';

export default function RouterComponent(): React.ReactElement {
console.log('BASE_URL', process.env.PUBLIC_URL);

Check warning on line 8 in src/components/RouterComponent/index.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected console statement
console.log('NODE_ENV', process.env.NODE_ENV);

Check warning on line 9 in src/components/RouterComponent/index.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected console statement
return (
<BrowserRouter>
<Routes>
<Route path="/" element={<App />} />
<Route path="/invite/:id" element={<InviteBackLink />} />
<Route path="/pr-preview/:pr/invite/:id" element={<InviteBackLink />} />
<Route
path="/pr-preview/:pr/*"
element={<Navigate to="/pr-preview/:pr/" replace />}
/>
<Route path="*" element={<Navigate to="/" replace />} />
</Routes>
</BrowserRouter>
Expand Down

0 comments on commit 0ab21fe

Please sign in to comment.