2022-11-24 20:11:50 +08:00
|
|
|
import React from 'react';
|
2022-11-15 22:55:01 +08:00
|
|
|
import { Skeleton, Space, Spin } from 'antd';
|
|
|
|
import { useLocation } from 'dumi';
|
|
|
|
|
2022-11-24 20:11:50 +08:00
|
|
|
const Loading: React.FC = () => {
|
2022-11-15 22:55:01 +08:00
|
|
|
const { pathname } = useLocation();
|
|
|
|
|
|
|
|
if (
|
|
|
|
pathname.startsWith('/components') ||
|
|
|
|
pathname.startsWith('/docs') ||
|
|
|
|
pathname.startsWith('/changelog')
|
|
|
|
) {
|
|
|
|
return (
|
2022-11-17 18:33:44 +08:00
|
|
|
<Space direction="vertical" style={{ width: '100%', marginTop: 24 }} size={40}>
|
2022-11-15 22:55:01 +08:00
|
|
|
<Skeleton title={false} active paragraph={{ rows: 3 }} />
|
|
|
|
<Skeleton active paragraph={{ rows: 3 }} />
|
|
|
|
</Space>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Space style={{ width: '100%', margin: '120px 0', justifyContent: 'center' }} align="center">
|
|
|
|
<Spin size="large" />
|
|
|
|
</Space>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Loading;
|