We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1aa6238 commit 24fd898Copy full SHA for 24fd898
apps/client/src/widgets/dialogs/add_link.tsx
@@ -30,6 +30,14 @@ function AddLinkDialogComponent() {
30
setShown(true);
31
});
32
33
+ useEffect(() => {
34
+ if (hasSelection) {
35
+ setLinkType("hyper-link");
36
+ } else {
37
+ setLinkType("reference-link");
38
+ }
39
+ }, [ hasSelection ])
40
+
41
async function setDefaultLinkTitle(noteId: string) {
42
const noteTitle = await tree.getNoteTitle(noteId);
43
setLinkTitle(noteTitle);
@@ -90,6 +98,7 @@ function AddLinkDialogComponent() {
90
98
}
91
99
92
100
const autocompleteRef = useRef<HTMLInputElement>(null);
101
+ console.log("Add link ", linkType, hasSelection);
93
102
94
103
return (
95
104
<Modal
0 commit comments