Moved Toast logic into own directory

This commit is contained in:
2025-02-01 13:00:02 +00:00
parent cd4bcd544f
commit abe1ea2055
9 changed files with 6 additions and 9 deletions
+2 -4
View File
@@ -1,7 +1,7 @@
<script lang="ts">
import { getJson } from "$lib/data";
import { Toast, ToastType } from "$lib/toast";
import { addToast } from "./store";
import { addToast } from "$lib/store";
</script>
<style>
@@ -30,7 +30,6 @@
font-size: 125%;
}
@media (max-width: 800px) {
.flex-container {
align-items: center;
@@ -73,12 +72,11 @@
<p class="about">{@html info.about}</p>
</div>
</div>
{:catch}
<div class="card">
<div class="card-header">
<h1>Unable to load portfolio overview data</h1>
</div>
</div>
{addToast(new Toast("Unable to load me.json", ToastType.Error, true, 3000))}
<div style="display: none;">{addToast(new Toast("Unable to load me.json", ToastType.Error, true, 3000))}</div>
{/await}