mirror of
https://seed.radicle.dev/rad:z4D5UCArafTzTQpDZNQRuqswh3ury.git
synced 2026-11-01 09:30:28 +08:00
Remove deprecated event dispatcher
This commit is contained in:
@@ -1,16 +1,11 @@
|
||||
<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) {
|
||||
@@ -18,7 +13,6 @@
|
||||
}
|
||||
|
||||
void push(route);
|
||||
dispatch("afterNavigate");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user