Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: mx of editor not being reset after exiting from focus mode

thecodrreb22fe74b4b7
diff --git a/apps/web/src/components/editor/index.js b/apps/web/src/components/editor/index.js
index 729b91005..23cbf704d 100644
--- a/apps/web/src/components/editor/index.js
+++ b/apps/web/src/components/editor/index.js
@@ -117,12 +117,10 @@ function Editor() {
variant="columnFill"
className="editor"
sx={{ mx: [0, 0, "15%"] }}
- animate={
- isFocusMode && {
- marginRight: "25%",
- marginLeft: "25%",
- }
- }
+ animate={{
+ marginRight: isFocusMode ? "25%" : "15%",
+ marginLeft: isFocusMode ? "25%" : "15%",
+ }}
transition={{ duration: 0.3, ease: "easeOut" }}
mt={[0, 0, 50]}
>