|
|
@ -72,6 +72,10 @@ const MemoContent: React.FC<Props> = (props: Props) => {
|
|
|
|
SNIPPET: { text: t("memo.show-less"), nextState: "ALL" },
|
|
|
|
SNIPPET: { text: t("memo.show-less"), nextState: "ALL" },
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
|
|
|
sessionStorage.getItem(`${memoName}`) && setShowCompactMode(sessionStorage.getItem(`${memoName}`) as ContentCompactView);
|
|
|
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<RendererContext.Provider
|
|
|
|
<RendererContext.Provider
|
|
|
|
value={{
|
|
|
|
value={{
|
|
|
@ -113,6 +117,7 @@ const MemoContent: React.FC<Props> = (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"
|
|
|
|
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={() => {
|
|
|
|
onClick={() => {
|
|
|
|
setShowCompactMode(compactStates[showCompactMode].nextState as ContentCompactView);
|
|
|
|
setShowCompactMode(compactStates[showCompactMode].nextState as ContentCompactView);
|
|
|
|
|
|
|
|
sessionStorage.setItem(`${memoName}`, compactStates[showCompactMode].nextState);
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{compactStates[showCompactMode].text}
|
|
|
|
{compactStates[showCompactMode].text}
|
|
|
|