Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(react): clean up
Elian Doran04913394c64f
diff --git a/apps/client/src/widgets/dialogs/branch_prefix.tsx b/apps/client/src/widgets/dialogs/branch_prefix.tsxindex 4fed71b18d..d16ae339bf 100644--- a/apps/client/src/widgets/dialogs/branch_prefix.tsx+++ b/apps/client/src/widgets/dialogs/branch_prefix.tsx@@ -9,6 +9,7 @@ import ReactBasicWidget from "../react/ReactBasicWidget.js";import froca from "../../services/froca.js";import tree from "../../services/tree.js";import FBranch from "../../entities/fbranch.js";+import Button from "../react/Button.jsx";interface BranchPrefixDialogProps {branch?: FBranch;@@ -35,7 +36,7 @@ function BranchPrefixDialogComponent({ branch }: BranchPrefixDialogProps) {onShown={() => branchInput.current?.focus()}onSubmit={onSubmit}helpPageId="TBwsyfadTA18"- footer={<button class="btn btn-primary btn-sm">{t("branch_prefix.save")}</button>}+ footer={<Button text={t("branch_prefix.save")} />}><div class="form-group"><label for="branch-prefix-input">{t("branch_prefix.prefix")}</label> diff --git a/apps/client/src/widgets/react/Button.tsx b/apps/client/src/widgets/react/Button.tsxindex fb5ca41b55..2dbceafa00 100644--- a/apps/client/src/widgets/react/Button.tsx+++ b/apps/client/src/widgets/react/Button.tsx@@ -1,11 +1,10 @@-import { useEffect, useRef } from "preact/hooks";-import shortcuts from "../../services/shortcuts";+import { useRef } from "preact/hooks";interface ButtonProps {text: string;className?: string;keyboardShortcut?: string;- onClick: () => void;+ onClick?: () => void;}export default function Button({ className, text, onClick, keyboardShortcut }: ButtonProps) {