2025-12-13 11:46:42 +02:00
|
|
|
import CollectionProperties from "../note_bars/CollectionProperties";
|
|
|
|
|
import { useNoteContext, useNoteProperty } from "../react/hooks";
|
|
|
|
|
import "./NoteTitleActions.css";
|
2025-12-09 22:22:28 +02:00
|
|
|
|
2025-12-13 11:46:42 +02:00
|
|
|
export default function NoteTitleActions() {
|
2025-12-11 18:53:48 +02:00
|
|
|
const { note } = useNoteContext();
|
2025-12-12 20:21:55 +02:00
|
|
|
const isHiddenNote = note && note.noteId !== "_search" && note.noteId.startsWith("_");
|
2025-12-11 18:53:48 +02:00
|
|
|
const noteType = useNoteProperty(note, "type");
|
2025-12-09 22:22:28 +02:00
|
|
|
|
2025-12-11 18:53:48 +02:00
|
|
|
return (
|
2025-12-13 11:46:42 +02:00
|
|
|
<div className="title-actions">
|
2025-12-12 20:21:55 +02:00
|
|
|
{note && !isHiddenNote && noteType === "book" && <CollectionProperties note={note} />}
|
2025-12-09 22:22:28 +02:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|