refactor: standardize 'prevent_default' helpers and batch format modules
- Renamed internal 'preventDefault' helpers to 'prevent_default' for project-wide snake_case consistency. - Corrected native event method calls from 'prevent_default()' to 'preventDefault()' to resolve runtime TypeErrors. - Applied batch formatting (printWidth: 80) to Journals and IDAA Recovery Meetings modules. - Removed deprecated 'preventDefault' imports from svelte/legacy. - Fixed Journal Entry 404 by migrating loader to V3 API helper.
This commit is contained in:
@@ -20,9 +20,9 @@
|
||||
oncancel
|
||||
}: Props = $props();
|
||||
|
||||
function preventDefault(fn: () => void) {
|
||||
function prevent_default(fn: () => void) {
|
||||
return function (event: Event) {
|
||||
event.preventDefault();
|
||||
event.prevent_default();
|
||||
fn();
|
||||
};
|
||||
}
|
||||
@@ -141,7 +141,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<form onsubmit={preventDefault(handle_submit)} class="p-4 space-y-4">
|
||||
<form onsubmit={prevent_default(handle_submit)} class="p-4 space-y-4">
|
||||
<h3 class="h3">{template_id ? 'Edit' : 'Create New'} Badge Template</h3>
|
||||
|
||||
<label class="label">
|
||||
|
||||
Reference in New Issue
Block a user