mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 18:50:41 +01:00
refactor(react): use beta approach for handling events everywhere
This commit is contained in:
@@ -9,7 +9,7 @@ import ReactBasicWidget from "../react/ReactBasicWidget";
|
||||
import options from "../../services/options";
|
||||
import importService from "../../services/import.js";
|
||||
import tree from "../../services/tree";
|
||||
import { useTriliumEventBeta } from "../react/hooks";
|
||||
import { useTriliumEvent } from "../react/hooks";
|
||||
|
||||
export default function UploadAttachmentsDialog() {
|
||||
const [ parentNoteId, setParentNoteId ] = useState<string>();
|
||||
@@ -19,7 +19,7 @@ export default function UploadAttachmentsDialog() {
|
||||
const [ description, setDescription ] = useState<string | undefined>(undefined);
|
||||
const [ shown, setShown ] = useState(false);
|
||||
|
||||
useTriliumEventBeta("showUploadAttachmentsDialog", ({ noteId }) => {
|
||||
useTriliumEvent("showUploadAttachmentsDialog", ({ noteId }) => {
|
||||
setParentNoteId(noteId);
|
||||
setShown(true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user