fix: revert changes to back component

This commit is contained in:
Arman
2022-06-14 11:56:09 +02:00
parent 82df90a10c
commit 76ef1ea0d6
+2 -10
View File
@@ -1,16 +1,8 @@
<script lang="ts">
import { goto } from '$app/navigation';
export let href: string;
function goBack() {
if (history.length > 1) {
history.back();
} else goto(href);
}
</script>
<button on:click={() => goBack()}>
<a {href}>
<i class="icon-cheveron-left" />
<slot />
</button>
</a>