remove router

This commit is contained in:
Jonathan Jenne 2022-06-08 23:51:43 +02:00
parent 62f479c1d5
commit 335e6e3a6b
1 changed files with 0 additions and 17 deletions

View File

@ -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