fix report details not showing after report is submitted
All checks were successful
delpoy / build-and-deploy (push) Successful in 36s
All checks were successful
delpoy / build-and-deploy (push) Successful in 36s
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user