fix report details not showing after report is submitted
All checks were successful
delpoy / build-and-deploy (push) Successful in 36s

This commit is contained in:
2024-12-20 19:24:59 +01:00
parent 60f031aa7b
commit 0280e2a277
3 changed files with 20 additions and 14 deletions

View File

@ -8,15 +8,17 @@
import { getPopupModalShowFn } from '$lib/context';
let {
reporterName,
reportedName = null,
reason,
reporterName = $bindable(),
reportedName = $bindable(null),
reason = $bindable(),
body = $bindable(),
users,
onsubmit
}: {
reporterName: string;
reportedName: string | null;
reason: string;
body: string;
users: string[];
onsubmit: () => void;
} = $props();
@ -24,7 +26,6 @@
let showPopupModal = getPopupModalShowFn();
let reported = $state(reportedName);
let content = $state('');
async function submitReport() {
await fetch(`${env.PUBLIC_BASE_PATH}/report/${$page.params.url_hash}`, {
@ -32,7 +33,7 @@
body: JSON.stringify({
reported: reported || null,
subject: reason,
body: content
body: body
})
});
}
@ -108,7 +109,7 @@
required={true}
rows={4}
label="Details über den Report Grund"
bind:value={content}
bind:value={body}
/>
</div>
</div>