Skip to content

Commit

Permalink
refactor: centralize notification message
Browse files Browse the repository at this point in the history
  • Loading branch information
ammezie committed Jun 20, 2022
1 parent a9abb59 commit 0e19d00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion templates/controllers/AuthController.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class AuthController {

session.flash({
notification: {
type: 'info',
type: 'success',
message: "Welcome back, you're now signed in.",
},
})
Expand Down
6 changes: 3 additions & 3 deletions templates/resources/views/layouts/app.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
x-transition:leave-end="transform scale-90 opacity-0"
>
@if(flashMessages.get('notification.type') === 'success')
<div class="bg-green-50 p-4 text-sm font-medium text-green-800">
<div class="bg-green-100 p-4 text-sm text-center font-medium text-green-800">
{{ flashMessages.get('notification.message') }}
</div>
@elseif(flashMessages.get('notification.type') === 'error')
<div class="bg-red-50 p-4 text-sm font-medium text-red-800">
<div class="bg-red-100 p-4 text-sm text-center font-medium text-red-800">
{{ flashMessages.get('notification.message') }}
</div>
@elseif(flashMessages.get('notification.type') === 'info')
<div class="bg-blue-50 p-4 text-sm font-medium text-blue-800">
<div class="bg-blue-100 p-4 text-sm text-center font-medium text-blue-800">
{{ flashMessages.get('notification.message') }}
</div>
@endif
Expand Down

0 comments on commit 0e19d00

Please sign in to comment.