remove router
This commit is contained in:
parent
62f479c1d5
commit
335e6e3a6b
|
@ -1,5 +1,4 @@
|
|||
<script>
|
||||
import Navigo from 'navigo'
|
||||
import MainInput from './lib/MainInput.svelte'
|
||||
import Note from './lib/Note.svelte'
|
||||
import Storage from './storage'
|
||||
|
@ -11,22 +10,6 @@
|
|||
let hasNotes = notes.length > 0
|
||||
let clearConfirm = false
|
||||
|
||||
const router = new Navigo('/')
|
||||
|
||||
router.on('/', function (match) {
|
||||
console.log("Clear Filter")
|
||||
shownNotes = notes
|
||||
})
|
||||
|
||||
router.on('/tag/:tag', function (match) {
|
||||
console.log("Filtering by tag " + match.data.tag)
|
||||
shownNotes = shownNotes.filter(note => {
|
||||
return note.tags.includes(match.data.tag)
|
||||
})
|
||||
})
|
||||
|
||||
router.resolve();
|
||||
|
||||
function handleNewNote(e) {
|
||||
notes.push(createNote(e.detail))
|
||||
notes = notes // Trigger reactiveness
|
||||
|
|
Loading…
Reference in New Issue