feat(web): BodyWrapper compoent update PageLoading
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import type { FC, ReactNode } from 'react'
|
import type { FC, ReactNode } from 'react'
|
||||||
import { Skeleton } from 'antd'
|
import PageEmpty from './PageEmpty'
|
||||||
import Empty from './index'
|
import PageLoading from './PageLoading'
|
||||||
|
|
||||||
interface BodyWrapperProps {
|
interface BodyWrapperProps {
|
||||||
children: ReactNode
|
children: ReactNode
|
||||||
@@ -9,10 +9,10 @@ interface BodyWrapperProps {
|
|||||||
}
|
}
|
||||||
const BodyWrapper: FC<BodyWrapperProps> = ({ children, loading = false, empty }) => {
|
const BodyWrapper: FC<BodyWrapperProps> = ({ children, loading = false, empty }) => {
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return <Skeleton active />
|
return <PageLoading />
|
||||||
}
|
}
|
||||||
if (!loading && empty) {
|
if (!loading && empty) {
|
||||||
return <Empty />
|
return <PageEmpty />
|
||||||
}
|
}
|
||||||
return children
|
return children
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user