Skip to content

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

Fix no notes causing crash (#6)

Waqar Ahmedac615667f094
diff --git a/apps/web/src/components/note/index.js b/apps/web/src/components/note/index.js
index 078a01fbb..7b68454cc 100644
--- a/apps/web/src/components/note/index.js
+++ b/apps/web/src/components/note/index.js
@@ -76,7 +76,7 @@ function sendOpenNoteEvent(note) {
const Note = ({ item, index }) => {
const note = item;
- return (
+ return note ? (
<ListItem
title={note.title}
body={note.headline}
@@ -94,7 +94,7 @@ const Note = ({ item, index }) => {
menuItems={menuItems(note)}
dropdownRefs={dropdownRefs}
/>
- );
+ ) : null;
};
export default Note;
diff --git a/apps/web/src/views/Home.js b/apps/web/src/views/Home.js
index 3bea1eb0d..e40276ace 100644
--- a/apps/web/src/views/Home.js
+++ b/apps/web/src/views/Home.js
@@ -57,7 +57,7 @@ function Home() {
<Box px={2} bg="background" py={1} />
) : (
<Box px={2} bg="background">
- <Text variant="heading" color="primary" fontSize={13}>
+ <Text variant="heading" color="primary" fontSize="subtitle">
{notes.groups[groupIndex].title}
</Text>
</Box>