Better error norifications
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
<script lang="ts">
|
||||
let { emailData = $bindable(), errors = $bindable() } = $props<{
|
||||
let { emailData = $bindable() } = $props<{
|
||||
emailData: {
|
||||
subject: string;
|
||||
body: string;
|
||||
};
|
||||
errors: Record<string, string>;
|
||||
}>();
|
||||
|
||||
const templateVariables = [
|
||||
@@ -37,9 +36,6 @@
|
||||
Detected templates: {subjectTemplatesDetected.map((v) => v.name).join(', ')}
|
||||
</p>
|
||||
{/if}
|
||||
{#if errors.subject}
|
||||
<p class="text-sm text-red-600">{errors.subject}</p>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -58,9 +54,7 @@
|
||||
Detected templates: {bodyTemplatesDetected.map((v) => v.name).join(', ')}
|
||||
</p>
|
||||
{/if}
|
||||
{#if errors.body}
|
||||
<p class="mt-1 text-sm text-red-600">{errors.body}</p>
|
||||
{/if}
|
||||
<!-- Errors now shown as toast notifications -->
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user