The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix(front): suppress full-page skeleton inside auth modal (#19875)
Charles Bochetde1e592cd384
diff --git a/packages/twenty-front/src/modules/app/components/LazyRoute.tsx b/packages/twenty-front/src/modules/app/components/LazyRoute.tsxindex 15a942a6110..0b49a0b7de7 100644--- a/packages/twenty-front/src/modules/app/components/LazyRoute.tsx+++ b/packages/twenty-front/src/modules/app/components/LazyRoute.tsx@@ -4,6 +4,7 @@ import { PageContentSkeletonLoader } from '~/loading/components/PageContentSkeletype LazyRouteProps = {children: ReactNode;+ fallback?: ReactNode;};const LazyRouteFallback = () => (@@ -12,6 +13,7 @@ const LazyRouteFallback = () => (</PageContainer>);-export const LazyRoute = ({ children }: LazyRouteProps) => (- <Suspense fallback={<LazyRouteFallback />}>{children}</Suspense>-);+export const LazyRoute = ({+ children,+ fallback = <LazyRouteFallback />,+}: LazyRouteProps) => <Suspense fallback={fallback}>{children}</Suspense>;diff --git a/packages/twenty-front/src/modules/app/hooks/useCreateAppRouter.tsx b/packages/twenty-front/src/modules/app/hooks/useCreateAppRouter.tsxindex 7cfa4cd001b..7fb09204b0c 100644--- a/packages/twenty-front/src/modules/app/hooks/useCreateAppRouter.tsx+++ b/packages/twenty-front/src/modules/app/hooks/useCreateAppRouter.tsx@@ -124,7 +124,7 @@ export const useCreateAppRouter = (<Routepath={AppPath.SignInUp}element={- <LazyRoute>+ <LazyRoute fallback={null}><SignInUp /></LazyRoute>}@@ -132,7 +132,7 @@ export const useCreateAppRouter = (<Routepath={AppPath.Invite}element={- <LazyRoute>+ <LazyRoute fallback={null}><SignInUp /></LazyRoute>}@@ -140,7 +140,7 @@ export const useCreateAppRouter = (<Routepath={AppPath.ResetPassword}element={- <LazyRoute>+ <LazyRoute fallback={null}><PasswordReset /></LazyRoute>}@@ -148,7 +148,7 @@ export const useCreateAppRouter = (<Routepath={AppPath.CreateWorkspace}element={- <LazyRoute>+ <LazyRoute fallback={null}><CreateWorkspace /></LazyRoute>}@@ -156,7 +156,7 @@ export const useCreateAppRouter = (<Routepath={AppPath.CreateProfile}element={- <LazyRoute>+ <LazyRoute fallback={null}><CreateProfile /></LazyRoute>}@@ -164,7 +164,7 @@ export const useCreateAppRouter = (<Routepath={AppPath.SyncEmails}element={- <LazyRoute>+ <LazyRoute fallback={null}><SyncEmails /></LazyRoute>}@@ -172,7 +172,7 @@ export const useCreateAppRouter = (<Routepath={AppPath.InviteTeam}element={- <LazyRoute>+ <LazyRoute fallback={null}><InviteTeam /></LazyRoute>}@@ -180,7 +180,7 @@ export const useCreateAppRouter = (<Routepath={AppPath.PlanRequired}element={- <LazyRoute>+ <LazyRoute fallback={null}><ChooseYourPlan /></LazyRoute>}@@ -188,7 +188,7 @@ export const useCreateAppRouter = (<Routepath={AppPath.PlanRequiredSuccess}element={- <LazyRoute>+ <LazyRoute fallback={null}><PaymentSuccess /></LazyRoute>}@@ -196,7 +196,7 @@ export const useCreateAppRouter = (<Routepath={AppPath.BookCallDecision}element={- <LazyRoute>+ <LazyRoute fallback={null}><BookCallDecision /></LazyRoute>}@@ -204,7 +204,7 @@ export const useCreateAppRouter = (<Routepath={AppPath.BookCall}element={- <LazyRoute>+ <LazyRoute fallback={null}><BookCall /></LazyRoute>}diff --git a/packages/twenty-front/src/modules/auth/components/AuthModal.tsx b/packages/twenty-front/src/modules/auth/components/AuthModal.tsxindex 72afad4e5a5..7107efdc97b 100644--- a/packages/twenty-front/src/modules/auth/components/AuthModal.tsx+++ b/packages/twenty-front/src/modules/auth/components/AuthModal.tsx@@ -9,7 +9,10 @@ import { useLocation } from 'react-router-dom';const StyledContent = styled.div`align-items: center;+ display: flex;+ flex-direction: column;justify-content: center;+ min-height: 320px;`;type AuthModalProps = {