mirror of
https://github.com/haiwen/seahub.git
synced 2025-04-28 03:10:45 +00:00
update local storage in detail (#7529)
Co-authored-by: -g <aries@Mac.local>
This commit is contained in:
parent
bbd4f15cca
commit
2fb65580e4
@ -10,7 +10,7 @@ const Collapse = ({ className, title, children, isShow = true }) => {
|
||||
|
||||
const toggleShowChildren = useCallback(() => {
|
||||
setShowChildren(!showChildren);
|
||||
window.sfMetadataContext.localStorage.setItem(CAPTURE_INFO_SHOW_KEY, !showChildren);
|
||||
window.localStorage.setItem(CAPTURE_INFO_SHOW_KEY, !showChildren);
|
||||
}, [showChildren]);
|
||||
|
||||
return (
|
||||
|
@ -66,7 +66,7 @@ const FileDetails = React.memo(({ repoID, dirent, path, direntDetail, isShowRepo
|
||||
const tagsField = useMemo(() => ({ type: CellType.SINGLE_SELECT, name: gettext('Tags') }), []);
|
||||
|
||||
useEffect(() => {
|
||||
const savedValue = window.sfMetadataContext.localStorage.getItem(CAPTURE_INFO_SHOW_KEY) || false;
|
||||
const savedValue = window.localStorage.getItem(CAPTURE_INFO_SHOW_KEY) === 'true';
|
||||
setCaptureInfoShow(savedValue);
|
||||
}, []);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user