Skip to content

Commit

Permalink
optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouwenxuan authored and 杨国璇 committed Oct 17, 2024
1 parent de46d14 commit 0039f48
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/dir-view-mode/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from '../../metadata/constants';
export { VIEW_TYPE } from '../../metadata/constants';
export const LIST_MODE = 'list';
export const GRID_MODE = 'grid';
export const METADATA_MODE = 'metadata';
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/dirent-detail/detail-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ const DetailContainer = React.memo(({ repoID, path, dirent, currentRepoInfo, rep
}

if (path === '/' && !dirent) {
return <LibDetail currentRepoInfo={currentRepoInfo} onClose={onClose} />;
return (
<LibDetail currentRepoInfo={currentRepoInfo} onClose={onClose} />
);
}

return (
Expand Down
1 change: 0 additions & 1 deletion frontend/src/metadata/hooks/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const MetadataProvider = ({ repoID, hideMetadataView, selectMetadataView,
const [navigation, setNavigation] = useState([]);
const [staticView, setStaticView] = useState([]);
const [, setCount] = useState(0);

const viewsMap = useRef({});

const cancelURLView = useCallback(() => {
Expand Down

0 comments on commit 0039f48

Please sign in to comment.