From 38305cd984794f4397ee12fdd3eecd0ad362d2db Mon Sep 17 00:00:00 2001 From: Himself65 Date: Tue, 16 May 2023 22:23:55 -0700 Subject: [PATCH] fix: hydration error (#2404) --- .../components/pure/loading/page-loading.tsx | 34 +++---------------- 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/apps/web/src/components/pure/loading/page-loading.tsx b/apps/web/src/components/pure/loading/page-loading.tsx index 3823adc704..d4b12087ad 100644 --- a/apps/web/src/components/pure/loading/page-loading.tsx +++ b/apps/web/src/components/pure/loading/page-loading.tsx @@ -1,4 +1,3 @@ -import { styled } from '@affine/component'; import { AffineLoading } from '@affine/component/affine-loading'; import { memo, Suspense } from 'react'; @@ -17,34 +16,9 @@ export const Loading = memo(function Loading() { ); }); -// Used for the full page loading -const StyledLoadingContainer = styled('div')(() => { - return { - height: '100vh', - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - color: '#6880FF', - flexDirection: 'column', - h1: { - fontSize: '2em', - marginTop: '15px', - fontWeight: '600', - }, - }; -}); - +/** + * @deprecated use skeleton instead + */ export const PageLoading = () => { - // We disable the loading on desktop, because want it looks faster. - // This is a design requirement. - if (environment.isDesktop) { - return null; - } - return ( - - - - ); + return null; }; - -export default PageLoading;