fix: minor ui fixes

This commit is contained in:
thecodrr
2020-12-08 14:18:15 +05:00
parent 77739a75a7
commit 50810dc2f8
3 changed files with 5 additions and 8 deletions

View File

@@ -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;
}

View File

@@ -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"

View File

@@ -8964,7 +8964,7 @@ normalize-url@^3.0.0, normalize-url@^3.0.1:
"notes-core@git+ssh://git@github.com:streetwriters/notesnook-core.git":
version "4.3.0"
resolved "git+ssh://git@github.com:streetwriters/notesnook-core.git#52f3ce5dc6224d72e6d1610be591cbfca5b9c37f"
resolved "git+ssh://git@github.com:streetwriters/notesnook-core.git#70fa2cbebb0d3f445699ae8b1d6c6f371d16310e"
dependencies:
fast-sort "^2.0.1"
fuzzysearch "^1.0.3"