Add isLoading to issue page

This commit is contained in:
Fred Boniface 2023-06-26 16:33:17 +01:00
parent 2b1478f685
commit 50f07bb32c

View File

@ -3,8 +3,10 @@
import Island from "$lib/islands/island.svelte";
import Nav from "$lib/navigation/nav.svelte";
import { onMount } from "svelte";
import Loading from "$lib/navigation/loading.svelte";
const title = "Report Issue";
let isLoading = false;
let reportType = "", reportSubject = "", reportMsg = "", reportCollected
onMount(async () => {
@ -26,6 +28,7 @@
async function send() {
console.log("SEND DATA REQUESTED")
isLoading = true
const formData = JSON.stringify({
labels: [reportType],
subject: reportSubject,
@ -53,6 +56,10 @@
</script>
<Header {title} />
{#if isLoading}
<Loading />
{/if}
{#if !preFlight}
<p>Any data that you enter here will be visible publicly
<a href="https://git.fjla.uk/OwlBoard/backend/issues" target="_blank">here</a>