Skip to content

Commit

Permalink
update local storage in detail
Browse files Browse the repository at this point in the history
  • Loading branch information
-g authored and -g committed Feb 27, 2025
1 parent 32a1639 commit 2d5fe7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}, []);

Expand Down

0 comments on commit 2d5fe7c

Please sign in to comment.