diff --git a/frontend/src/components/cur-dir-path/dir-tool.js b/frontend/src/components/cur-dir-path/dir-tool.js index e95dad80831..2628da7fcd8 100644 --- a/frontend/src/components/cur-dir-path/dir-tool.js +++ b/frontend/src/components/cur-dir-path/dir-tool.js @@ -24,7 +24,6 @@ const propTypes = { sortOrder: PropTypes.string, sortItems: PropTypes.func, viewId: PropTypes.string, - viewType: PropTypes.string, }; class DirTool extends React.Component { diff --git a/frontend/src/components/cur-dir-path/index.js b/frontend/src/components/cur-dir-path/index.js index b8103cdd9b3..22df8e4b545 100644 --- a/frontend/src/components/cur-dir-path/index.js +++ b/frontend/src/components/cur-dir-path/index.js @@ -39,7 +39,6 @@ const propTypes = { repoTags: PropTypes.array.isRequired, onFileTagChanged: PropTypes.func.isRequired, viewId: PropTypes.string, - viewType: PropTypes.string, onItemMove: PropTypes.func.isRequired, }; @@ -103,7 +102,6 @@ class CurDirPath extends React.Component { sortOrder={this.props.sortOrder} sortItems={this.props.sortItems} viewId={this.props.viewId} - viewType={this.props.viewType} />} {!isDesktop && this.props.direntList.length > 0 && } diff --git a/frontend/src/metadata/hooks/metadata.js b/frontend/src/metadata/hooks/metadata.js index 135ff37d714..5cd51e0ab20 100644 --- a/frontend/src/metadata/hooks/metadata.js +++ b/frontend/src/metadata/hooks/metadata.js @@ -101,7 +101,6 @@ export const MetadataProvider = ({ repoID, hideMetadataView, selectMetadataView, parentNode: {}, key: repoID, view_id: view._id, - view_type: view.type, }; selectMetadataView(node); setShowFirstView(false); diff --git a/frontend/src/metadata/metadata-view/components/table/container.js b/frontend/src/metadata/metadata-view/components/table/container.js index c1ac6d1e4d8..039ea8df79b 100644 --- a/frontend/src/metadata/metadata-view/components/table/container.js +++ b/frontend/src/metadata/metadata-view/components/table/container.js @@ -5,10 +5,10 @@ import { CommonlyUsedHotkey, getValidGroupbys } from '../../_basic'; import { gettext } from '../../utils'; import { useMetadata } from '../../hooks'; import TableMain from './table-main'; +import Gallery from './gallery'; import { Utils } from '../../../../utils/utils'; import './index.css'; -import Gallery from './gallery'; const Container = () => { const [isLoadingMore, setLoadingMore] = useState(false); diff --git a/frontend/src/pages/lib-content-view/lib-content-container.js b/frontend/src/pages/lib-content-view/lib-content-container.js index b81d119fab1..679e1643638 100644 --- a/frontend/src/pages/lib-content-view/lib-content-container.js +++ b/frontend/src/pages/lib-content-view/lib-content-container.js @@ -40,7 +40,6 @@ const propTypes = { filePermission: PropTypes.string, content: PropTypes.string, viewId: PropTypes.string, - viewType: PropTypes.string, lastModified: PropTypes.string, latestContributor: PropTypes.string, onLinkClick: PropTypes.func.isRequired, @@ -222,7 +221,6 @@ class LibContentContainer extends React.Component { onFileTagChanged={this.props.onToolbarFileTagChanged} repoTags={this.props.repoTags} viewId={this.props.viewId} - viewType={this.props.viewType} onItemMove={this.props.onItemMove} /> { + showFileMetadata = (filePath, viewId) => { const repoID = this.props.repoID; const repoInfo = this.state.currentRepoInfo; @@ -523,7 +522,6 @@ class LibContentView extends React.Component { isFileLoadedErr: false, content: '__sf-metadata', viewId: viewId, - viewType: viewType, isDirentDetailShow: false }); @@ -1834,7 +1832,7 @@ class LibContentView extends React.Component { } } else if (Utils.isFileMetadata(node?.object?.type)) { if (node.path !== this.state.path) { - this.showFileMetadata(node.path, node.view_id || '0000', node.view_type || 'table'); + this.showFileMetadata(node.path, node.view_id || '0000'); } } else { let url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(node.path); @@ -2207,7 +2205,6 @@ class LibContentView extends React.Component { filePermission={this.state.filePermission} content={this.state.content} viewId={this.state.viewId} - viewType={this.state.viewType} lastModified={this.state.lastModified} latestContributor={this.state.latestContributor} onLinkClick={this.onLinkClick}