The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Remove flash after create workspace (#5589)
martmullbcb5cf7ad7b2
diff --git a/packages/twenty-front/src/modules/users/components/UserProvider.tsx b/packages/twenty-front/src/modules/users/components/UserProvider.tsxindex 806bcf35ebf..e35cbabfa13 100644--- a/packages/twenty-front/src/modules/users/components/UserProvider.tsx+++ b/packages/twenty-front/src/modules/users/components/UserProvider.tsx@@ -2,10 +2,18 @@ import React from 'react';import { useRecoilValue } from 'recoil';import { isCurrentUserLoadedState } from '@/auth/states/isCurrentUserLoadingState';+import { AppPath } from '@/types/AppPath';+import { useIsMatchingLocation } from '~/hooks/useIsMatchingLocation';import { UserOrMetadataLoader } from '~/loading/components/UserOrMetadataLoader';export const UserProvider = ({ children }: React.PropsWithChildren) => {const isCurrentUserLoaded = useRecoilValue(isCurrentUserLoadedState);+ const isMatchingLocation = useIsMatchingLocation();- return !isCurrentUserLoaded ? <UserOrMetadataLoader /> : <>{children}</>;+ return !isCurrentUserLoaded &&+ !isMatchingLocation(AppPath.CreateWorkspace) ? (+ <UserOrMetadataLoader />+ ) : (+ <>{children}</>+ );};