1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-13 22:01:06 +00:00

refactor(metadata): update code structure (#6765)

This commit is contained in:
Jerry Ren
2024-09-14 16:31:32 +08:00
committed by GitHub
parent 7f56426ad8
commit e3c0dcfffc
338 changed files with 751 additions and 1243 deletions

View File

@@ -0,0 +1,17 @@
import React from 'react';
import PropTypes from 'prop-types';
import { useMetadata } from '../hooks';
const MetadataViewName = ({ id }) => {
const { viewsMap } = useMetadata();
if (!id) return null;
const view = viewsMap[id];
if (!view) return null;
return (<>{view.name}</>);
};
MetadataViewName.propTypes = {
id: PropTypes.string,
};
export default MetadataViewName;