refactor(react/modals): use classless components

This commit is contained in:
Elian Doran
2025-08-24 20:57:23 +03:00
parent 7c86f90ac6
commit a507991808
28 changed files with 106 additions and 321 deletions

View File

@@ -20,7 +20,7 @@ import ActionButton from "../react/ActionButton";
import options from "../../services/options";
import useTriliumEvent from "../react/hooks";
function RevisionsDialogComponent() {
export default function RevisionsDialog() {
const [ note, setNote ] = useState<FNote>();
const [ revisions, setRevisions ] = useState<RevisionItem[]>();
const [ currentRevision, setCurrentRevision ] = useState<RevisionItem>();
@@ -291,14 +291,6 @@ function RevisionFooter({ note }: { note?: FNote }) {
</>;
}
export default class RevisionsDialog extends ReactBasicWidget {
get component() {
return <RevisionsDialogComponent />
}
}
async function getNote(noteId?: string | null) {
if (noteId) {
return await froca.getNote(noteId);