From fc6b96e1f8e4f9f1f43ead24de9a0361b0e71bbb Mon Sep 17 00:00:00 2001 From: Andinus Date: Sat, 9 Oct 2021 20:09:00 +0530 Subject: Update dispatch mechanism --- src/Navbar.svelte | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Navbar.svelte b/src/Navbar.svelte index 97d8348..5b70e53 100644 --- a/src/Navbar.svelte +++ b/src/Navbar.svelte @@ -7,19 +7,21 @@ const dispatch = createEventDispatcher(); - const pageHome = () => {dispatch('message', { page: Home });} - const pageDDA = () => {dispatch('message', { page: DDA });} - const pageBresenham = () => {dispatch('message', { page: Bresenham });} + const changePage = (p) => dispatch('message', { page: p }); -- cgit 1.4.1-2-gfad0