Skip to content

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

fix: minor ui fixes

thecodrr50810dc2f8e9
diff --git a/apps/web/src/common/height-calculator.js b/apps/web/src/common/height-calculator.js
index ea852cadf..9aedf8c99 100644
--- a/apps/web/src/common/height-calculator.js
+++ b/apps/web/src/common/height-calculator.js
@@ -11,8 +11,7 @@ function getNoteHeight(item) {
const { notebook, headline } = item;
let height = SINGLE_LINE_HEIGHT * 3;
//if (title.length > 35) height += SINGLE_LINE_HEIGHT;
- if (headline?.length > 0) height += SINGLE_LINE_HEIGHT;
- if (headline?.length > 50) height += SINGLE_LINE_HEIGHT;
+ if (headline?.length > 0) height += SINGLE_LINE_HEIGHT * 2;
if (notebook) height += SINGLE_LINE_HEIGHT / 2;
return height * DEFAULT_FONT_SIZE;
@@ -33,11 +32,9 @@ function getNotebookHeight(item) {
if (description?.length > 0) {
height += SINGLE_LINE_HEIGHT;
- }
-
- if (description?.length > 50) {
height += SINGLE_LINE_HEIGHT;
}
+
return height * DEFAULT_FONT_SIZE;
}
diff --git a/apps/web/src/components/note/index.js b/apps/web/src/components/note/index.js
index cc8fbcb6d..5106445e9 100644
--- a/apps/web/src/components/note/index.js
+++ b/apps/web/src/components/note/index.js
@@ -126,7 +126,7 @@ function Note(props) {
const theme = useTheme();
const color = useMemo(() => COLORS[note.color], [note.color]);
const notebook = useMemo(
- () => note.notebooks && db.notebooks.notebook(note.notebooks[0].id).data,
+ () => note.notebooks && db.notebooks.notebook(note.notebooks[0].id)?.data,
[note.notebooks]
);
@@ -140,7 +140,7 @@ function Note(props) {
id={note.id}
index={index}
header={
- note.notebooks && (
+ notebook && (
<Flex
alignSelf="flex-start"
justifySelf="flex-start"
diff --git a/apps/web/yarn.lock b/apps/web/yarn.lock
index 710d63107..9e107ef12 100644
--- a/apps/web/yarn.lock
+++ b/apps/web/yarn.lock
@@ -8964,7 +8964,7 @@ normalize-url@^3.0.0, normalize-url@^3.0.1:
"notes-core@git+ssh://[email protected]:streetwriters/notesnook-core.git":
version "4.3.0"
- resolved "git+ssh://[email protected]:streetwriters/notesnook-core.git#52f3ce5dc6224d72e6d1610be591cbfca5b9c37f"
+ resolved "git+ssh://[email protected]:streetwriters/notesnook-core.git#70fa2cbebb0d3f445699ae8b1d6c6f371d16310e"
dependencies:
fast-sort "^2.0.1"
fuzzysearch "^1.0.3"