diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index 6833591..bcff769 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -53,6 +53,9 @@ }, async retrieveMails() { this.mails = await (await fetch("{{ route('laravelWebMailer.fetchAll') }}")).json(); + if (this.mails.length === 0) { + this.currentMail = false; + } }, async confirmAndDeleteAllMails() { if (!confirm('Are you sure you want to delete all emails?')) { @@ -130,7 +133,7 @@ class="flex items-center text-sm rounded-full border-2 border-neutral-700 px-3 p @click="showMail(index)" :class="{'bg-neutral-100' : mail.isRead, 'border-x-blue-500' : (mail.messageId===currentMail.messageId), 'border-x-transparent' : (mail.messageId!==currentMail.messageId) }" > -