Skip to content

Commit

Permalink
Merge pull request #158 from maxmezzomo/main
Browse files Browse the repository at this point in the history
Enhance redirect routes behavior
  • Loading branch information
pfferrari authored Jan 21, 2025
2 parents 533a504 + 4a345f2 commit a17ce96
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/bundles/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const App: FC<AppProps> = ({ routerBase }) => {
<Router base={routerBase}>
<Switch>
<Route path={appRoutes.home.path}>
<Redirect to={appRoutes.list.path} />
<Redirect to={appRoutes.list.path} replace />
</Route>
<Route path={appRoutes.list.path}>
<BundlesList />
Expand Down
2 changes: 1 addition & 1 deletion apps/gift_cards/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { FC } from 'react'
import { Redirect } from 'wouter'

const Home: FC = () => {
return <Redirect to={appRoutes.list.path} />
return <Redirect to={appRoutes.list.path} replace />
}

export default Home
2 changes: 1 addition & 1 deletion apps/sku_lists/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const App: FC<AppProps> = ({ routerBase }) => {
<Router base={routerBase}>
<Switch>
<Route path={appRoutes.home.path}>
<Redirect to={appRoutes.list.path} />
<Redirect to={appRoutes.list.path} replace />
</Route>
<Route path={appRoutes.list.path} component={SkuListsList} />
<Route path={appRoutes.details.path} component={SkuListDetails} />
Expand Down
2 changes: 1 addition & 1 deletion apps/skus/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const App: FC<AppProps> = ({ routerBase }) => {
<Router base={routerBase}>
<Switch>
<Route path={appRoutes.home.path}>
<Redirect to={appRoutes.list.path} />
<Redirect to={appRoutes.list.path} replace />
</Route>
<Route path={appRoutes.list.path} component={SkusList} />
<Route path={appRoutes.filters.path} component={Filters} />
Expand Down
2 changes: 1 addition & 1 deletion apps/subscriptions/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const App: FC<AppProps> = ({ routerBase }) => {
<Router base={routerBase}>
<Switch>
<Route path={appRoutes.home.path}>
<Redirect to={appRoutes.list.path} />
<Redirect to={appRoutes.list.path} replace />
</Route>
<Route path={appRoutes.list.path}>
<SubscriptionsList />
Expand Down
2 changes: 1 addition & 1 deletion apps/tags/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const App: FC<AppProps> = ({ routerBase }) => {
<Router base={routerBase}>
<Switch>
<Route path={appRoutes.home.path}>
<Redirect to={appRoutes.list.path} />
<Redirect to={appRoutes.list.path} replace />
</Route>
<Route path={appRoutes.list.path}>
<TagList />
Expand Down

0 comments on commit a17ce96

Please sign in to comment.