mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-06 22:19:25 +08:00
refactor: collectionNotAllowViewPlaceholder (#5224)
This commit is contained in:
parent
c3732efaec
commit
84600cb20d
@ -114,11 +114,7 @@ export const CollectionDeletedPlaceholder: FC<CollectionDeletedPlaceholderProps>
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export const CollectionNotAllowViewPlaceholder: FC<any> = () => {
|
||||
const { designable } = useDesignable();
|
||||
const CollectionNotAllowView = () => {
|
||||
const { t } = useTranslation();
|
||||
const dataSource = useDataSource();
|
||||
const compile = useCompile();
|
||||
@ -146,13 +142,21 @@ export const CollectionNotAllowViewPlaceholder: FC<any> = () => {
|
||||
},
|
||||
).replaceAll('>', '>');
|
||||
}, [nameValue, t]);
|
||||
return (
|
||||
<BlockItemCard>
|
||||
<Result status="404" subTitle={messageValue} />
|
||||
</BlockItemCard>
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export const CollectionNotAllowViewPlaceholder: FC<any> = () => {
|
||||
const { designable } = useDesignable();
|
||||
|
||||
if (designable) {
|
||||
return (
|
||||
<BlockItemCard>
|
||||
<Result status="404" subTitle={messageValue} />
|
||||
</BlockItemCard>
|
||||
);
|
||||
return <CollectionNotAllowView />;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user