Skip to content

Commit 664c009

Browse files
authored
Merge pull request #843 from topcoder-platform/TAL-36_talent-search-behind-admin
TAL-36 - await restricted route user roles
2 parents 9c04a2e + 1b5a6b3 commit 664c009

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libs/core/lib/router/restricted.route.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { FC, useContext } from 'react'
22

33
import { RestrictedPage } from '~/libs/shared'
4+
import { LoadingSpinner } from '~/libs/ui'
45

56
import { profileContext, ProfileContextData } from '../profile'
67

@@ -17,7 +18,7 @@ const RestrictedRoute: FC<RestrictedRouteProps> = props => {
1718

1819
// if we're not initialized yet, just return the children
1920
if (!initialized) {
20-
return props.children
21+
return <LoadingSpinner />
2122
}
2223

2324
// if we have a profile and `rolesRequired` is configured for the route

0 commit comments

Comments
 (0)