-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly show messages for the user if already added to mailing list
- Loading branch information
1 parent
bc0e615
commit 517c2a7
Showing
2 changed files
with
27 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
<div class="center bg-blue-500 p-4 md:p-14"> | ||
<form class="w-full max-w-md flex flex-col gap-4 center bg-blue-500 items-center" wire:submit.prevent="subscribe"> | ||
@csrf | ||
<x-text-input type="email" name="email" autocomplete="email" placeholder="Your email address" required /> | ||
@error('email') | ||
<p class="text-xs text-red-500">{{ $message }}</p> | ||
@enderror | ||
<button class="py-2 text-blue-500 font-semibold w-full bg-white px-4 rounded-md ring" type="submit"> | ||
Subscribe | ||
<i class="fas fa-paper-plane"></i> | ||
</button> | ||
</form> | ||
<div class=""> | ||
@if (session()->has('message')) | ||
<div class="text-white w-full alert alert-warning rounded-none bg-green-500"> | ||
{{ session('message') }} | ||
</div> | ||
@endif | ||
<div class="center flex-col bg-blue-500 p-4 md:p-14"> | ||
<form class="w-full max-w-md flex flex-col gap-4 center bg-blue-500 items-center" wire:submit.prevent="subscribe"> | ||
@csrf | ||
<x-text-input type="email" wire:model="email" autocomplete="email" placeholder="Your email address" required /> | ||
@error('email') | ||
<p class="text-xs text-red-500">{{ $message }}</p> | ||
@enderror | ||
<button class="py-2 text-blue-500 font-semibold w-full bg-white px-4 rounded-md ring" type="submit"> | ||
Subscribe | ||
<i class="fas fa-paper-plane"></i> | ||
</button> | ||
</form> | ||
</div> | ||
</div> |