chore(client): remove redundant log

This commit is contained in:
Elian Doran 2025-09-22 20:08:37 +03:00
parent 59fe1299b2
commit 5249911ddb
No known key found for this signature in database

View File

@ -28,8 +28,8 @@ const SEPARATOR_TITLE_REPLACEMENTS = [
export default function NoteTypeChooserDialogComponent() { export default function NoteTypeChooserDialogComponent() {
const [ callback, setCallback ] = useState<ChooseNoteTypeCallback>(); const [ callback, setCallback ] = useState<ChooseNoteTypeCallback>();
const [ shown, setShown ] = useState(false); const [ shown, setShown ] = useState(false);
const [ parentNote, setParentNote ] = useState<Suggestion | null>(); const [ parentNote, setParentNote ] = useState<Suggestion | null>();
const [ noteTypes, setNoteTypes ] = useState<MenuItem<TreeCommandNames>[]>([]); const [ noteTypes, setNoteTypes ] = useState<MenuItem<TreeCommandNames>[]>([]);
useTriliumEvent("chooseNoteType", ({ callback }) => { useTriliumEvent("chooseNoteType", ({ callback }) => {
setCallback(() => callback); setCallback(() => callback);
@ -37,7 +37,6 @@ export default function NoteTypeChooserDialogComponent() {
}); });
useEffect(() => { useEffect(() => {
console.log(noteTypes);
note_types.getNoteTypeItems().then(noteTypes => { note_types.getNoteTypeItems().then(noteTypes => {
let index = -1; let index = -1;
@ -57,7 +56,7 @@ export default function NoteTypeChooserDialogComponent() {
function onNoteTypeSelected(value: string) { function onNoteTypeSelected(value: string) {
const [ noteType, templateNoteId ] = value.split(","); const [ noteType, templateNoteId ] = value.split(",");
callback?.({ callback?.({
success: true, success: true,
noteType, noteType,
@ -96,8 +95,8 @@ export default function NoteTypeChooserDialogComponent() {
<FormGroup name="note-type" label={t("note_type_chooser.modal_body")}> <FormGroup name="note-type" label={t("note_type_chooser.modal_body")}>
<FormList onSelect={onNoteTypeSelected}> <FormList onSelect={onNoteTypeSelected}>
{noteTypes.map((_item) => { {noteTypes.map((_item) => {
if ("kind" in _item && _item.kind === "separator") { if ("kind" in _item && _item.kind === "separator") {
return; return;
} }
const item = _item as MenuCommandItem<TreeCommandNames>; const item = _item as MenuCommandItem<TreeCommandNames>;
@ -110,7 +109,7 @@ export default function NoteTypeChooserDialogComponent() {
icon={item.uiIcon}> icon={item.uiIcon}>
{item.title} {item.title}
{item.badges && item.badges.map((badge) => <Badge {...badge} />)} {item.badges && item.badges.map((badge) => <Badge {...badge} />)}
</FormListItem>; </FormListItem>;
} }
})} })}
</FormList> </FormList>