mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 06:16:59 +08:00
fix: hydration error (#2404)
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import { styled } from '@affine/component';
|
|
||||||
import { AffineLoading } from '@affine/component/affine-loading';
|
import { AffineLoading } from '@affine/component/affine-loading';
|
||||||
import { memo, Suspense } from 'react';
|
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')(() => {
|
* @deprecated use skeleton instead
|
||||||
return {
|
*/
|
||||||
height: '100vh',
|
|
||||||
display: 'flex',
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
color: '#6880FF',
|
|
||||||
flexDirection: 'column',
|
|
||||||
h1: {
|
|
||||||
fontSize: '2em',
|
|
||||||
marginTop: '15px',
|
|
||||||
fontWeight: '600',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
export const PageLoading = () => {
|
export const PageLoading = () => {
|
||||||
// We disable the loading on desktop, because want it looks faster.
|
return null;
|
||||||
// This is a design requirement.
|
|
||||||
if (environment.isDesktop) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<StyledLoadingContainer>
|
|
||||||
<Loading />
|
|
||||||
</StyledLoadingContainer>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default PageLoading;
|
|
||||||
|
|||||||
Reference in New Issue
Block a user