diff --git a/web/src/components/MemoContent/index.tsx b/web/src/components/MemoContent/index.tsx index bc893be844b87..e735f5612d748 100644 --- a/web/src/components/MemoContent/index.tsx +++ b/web/src/components/MemoContent/index.tsx @@ -72,6 +72,10 @@ const MemoContent: React.FC = (props: Props) => { SNIPPET: { text: t("memo.show-less"), nextState: "ALL" }, }; + useEffect(() => { + sessionStorage.getItem(`${memoName}`) && setShowCompactMode(sessionStorage.getItem(`${memoName}`) as ContentCompactView); + }, []); + return ( = (props: Props) => { className="w-auto flex flex-row justify-start items-center cursor-pointer text-sm text-blue-600 dark:text-blue-400 hover:opacity-80" onClick={() => { setShowCompactMode(compactStates[showCompactMode].nextState as ContentCompactView); + sessionStorage.setItem(`${memoName}`, compactStates[showCompactMode].nextState); }} > {compactStates[showCompactMode].text}