♻️ (flux note) move in a component flux …

flux note will be used for fleeting notes and
drafts too
This commit is contained in:
2021-03-20 19:40:00 +01:00
parent fc008bbaf8
commit a8cc196508
8 changed files with 181 additions and 96 deletions

View File

@@ -28,6 +28,7 @@ export const useLinks = (className: string, sha?: string) => {
const removeListeners = () => {
const elements = document.querySelectorAll(selector)
elements.forEach((element) => {
element.removeEventListener('click', linkNote)
})
@@ -36,6 +37,7 @@ export const useLinks = (className: string, sha?: string) => {
const listenToClick = () => {
removeListeners()
const elements = document.querySelectorAll(selector)
elements.forEach((element) => {
element.addEventListener('click', linkNote)
})