fix: show notebook indicator on note

This commit is contained in:
thecodrr
2020-12-08 11:47:40 +05:00
parent 3cfee0616a
commit 38aa76de6d
2 changed files with 5 additions and 5 deletions

View File

@@ -33,7 +33,7 @@ class MoveDialog extends React.Component {
return (
<Dialog
isOpen={true}
title={"Add Note to Notebook"}
title={"Add to Notebook"}
description={"Organize your notes by adding them to notebooks."}
icon={Icon.Move}
onClose={props.onClose}

View File

@@ -25,7 +25,7 @@ function menuItems(note, context) {
return [
{ title: "colors", component: <Colors data={note} /> },
{
title: note.notebook?.id ? "Move" : "Add to",
title: "Add to notebook",
onClick: async () => {
await showMoveNoteDialog([note.id]);
},
@@ -126,8 +126,8 @@ function Note(props) {
const theme = useTheme();
const color = useMemo(() => COLORS[note.color], [note.color]);
const notebook = useMemo(
() => note.notebook && db.notebooks.notebook(note.notebook.id).data,
[note.notebook]
() => note.notebooks && db.notebooks.notebook(note.notebooks[0].id).data,
[note.notebooks]
);
return (
@@ -140,7 +140,7 @@ function Note(props) {
id={note.id}
index={index}
header={
note.notebook && (
note.notebooks && (
<Flex
alignSelf="flex-start"
justifySelf="flex-start"