Skip to content

Commit

Permalink
Remove deprecated event dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfs committed Sep 3, 2024
1 parent ffcbbeb commit dedfaf1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/components/Link.svelte
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
<script lang="ts" strictEvents>
<script lang="ts">
import type { Route } from "@app/lib/router/definitions";
import { createEventDispatcher } from "svelte";
import { push, routeToPath } from "@app/lib/router";
export let route: Route;
export let disabled: boolean = false;
const dispatch = createEventDispatcher<{
afterNavigate: null;
}>();
function navigateToRoute(event: MouseEvent): void {
event.preventDefault();
if (disabled) {
return;
}
void push(route);
dispatch("afterNavigate");
}
</script>

Expand Down

0 comments on commit dedfaf1

Please sign in to comment.