Skip to content

Commit f871b7d

Browse files
authored
Merge pull request #1054 from singnet/fix-routing
[SM-159] fix rerouting to the aimarketplace page
2 parents 728de9a + 46a18f0 commit f871b7d

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/App.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const App = () => {
6161

6262
useEffect(() => {
6363
dispatch(userActions.fetchUserDetails());
64-
dispatch(userActions.getIsTermsAcceptedInfo());
64+
isLoggedIn && dispatch(userActions.getIsTermsAcceptedInfo());
6565
}, [dispatch]);
6666

6767
const Loader = () => {
@@ -170,17 +170,7 @@ const App = () => {
170170
/>
171171
}
172172
/>
173-
<Route
174-
path="/"
175-
element={
176-
<PrivateRoute
177-
isAllowed={isLoggedInAndTermsAccepted}
178-
component={withInAppWrapper(AiMarketplace)}
179-
redirectTo={`/${Routes.ONBOARDING}`}
180-
path="/"
181-
/>
182-
}
183-
/>
173+
<Route path="/" Component={withInAppWrapper(AiMarketplace)} />
184174
<Route path={`/${Routes.AI_REQUEST_FORM}`} Component={AiRequestForm} />
185175
<Route path={`/${Routes.GET_STARTED}`} Component={withInAppWrapper(GetStarted)} />
186176
<Route path="*" Component={PageNotFound} />

0 commit comments

Comments
 (0)