File tree 1 file changed +9
-1
lines changed
packages/twenty-front/src/modules/users/components
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,18 @@ import React from 'react';
2
2
import { useRecoilValue } from 'recoil' ;
3
3
4
4
import { isCurrentUserLoadedState } from '@/auth/states/isCurrentUserLoadingState' ;
5
+ import { AppPath } from '@/types/AppPath' ;
6
+ import { useIsMatchingLocation } from '~/hooks/useIsMatchingLocation' ;
5
7
import { UserOrMetadataLoader } from '~/loading/components/UserOrMetadataLoader' ;
6
8
7
9
export const UserProvider = ( { children } : React . PropsWithChildren ) => {
8
10
const isCurrentUserLoaded = useRecoilValue ( isCurrentUserLoadedState ) ;
11
+ const isMatchingLocation = useIsMatchingLocation ( ) ;
9
12
10
- return ! isCurrentUserLoaded ? < UserOrMetadataLoader /> : < > { children } </ > ;
13
+ return ! isCurrentUserLoaded &&
14
+ ! isMatchingLocation ( AppPath . CreateWorkspace ) ? (
15
+ < UserOrMetadataLoader />
16
+ ) : (
17
+ < > { children } </ >
18
+ ) ;
11
19
} ;
You can’t perform that action at this time.
0 commit comments