🐛 (flux) listen to click day 1

This commit is contained in:
2021-03-24 21:33:21 +01:00
parent e199c68d68
commit 55faf04d4f
5 changed files with 32 additions and 12 deletions

View File

@@ -1,9 +1,12 @@
import { noteEventBus } from '@/bus/noteBusEvent'
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
import { onUnmounted } from '@vue/runtime-core'
const LINKS = ['http://', 'https://']
export const useLinks = (className: string, sha?: string) => {
const store = useUserRepoStore()
const linkNote: EventListener = (event) => {
event.preventDefault()
const target = event.target as HTMLElement
@@ -20,7 +23,9 @@ export const useLinks = (className: string, sha?: string) => {
noteEventBus.emit({
path: href,
currentNoteSHA: sha
currentNoteSHA: sha,
user: store.user,
repo: store.repo
})
}