fix(component): affine loading (#1887)

This commit is contained in:
Himself65
2023-04-11 23:48:42 -05:00
committed by GitHub
parent 5535440c55
commit 9dcb96839b
7 changed files with 91 additions and 125 deletions

View File

@@ -1,7 +1,22 @@
import { styled } from '@affine/component';
import { AffineLoading } from '@affine/component/affine-loading';
import { useTranslation } from '@affine/i18n';
import { memo, Suspense } from 'react';
import Loading from './Loading';
export const Loading = memo(function Loading() {
return (
<div
style={{
height: '180px',
width: '180px',
}}
>
<Suspense>
<AffineLoading loop={true} autoplay={true} autoReverse={true} />
</Suspense>
</div>
);
});
// Used for the full page loading
const StyledLoadingContainer = styled('div')(() => {