Skip to content

Commit 38a4989

Browse files
committed
ProfileLandingPage: when redirecting, use the "rootRoute"
1 parent 0f78040 commit 38a4989

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/apps/profiles/src/profiles-landing-page/ProfilesLandingPage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { NavigateFunction, useNavigate } from 'react-router-dom'
33

44
import { profileContext, ProfileContextData } from '~/libs/core'
55

6+
import { rootRoute } from '../profiles.routes'
7+
68
const ProfilesLandingPage: FC = () => {
79
const navigate: NavigateFunction = useNavigate()
810

@@ -11,7 +13,7 @@ const ProfilesLandingPage: FC = () => {
1113
// redirect to profile page if logged in
1214
useEffect(() => {
1315
if (authProfile) {
14-
navigate(`/${authProfile.handle}`)
16+
navigate(`${rootRoute}/${authProfile.handle}`)
1517
}
1618
}, [authProfile, navigate])
1719

0 commit comments

Comments
 (0)