Skip to content

Commit

Permalink
used utility function for handle alert component issue
Browse files Browse the repository at this point in the history
Signed-off-by: pranalidhanavade <[email protected]>
  • Loading branch information
pranalidhanavade committed Oct 9, 2024
1 parent f4cd15c commit 46b10c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/User/UserDashBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ const UserDashBoard = () => {
<>
<div className="px-4 pt-6">
<div className="cursor-pointer">
{error !== '' &&
{(error !== '' || message !== '') &&
<AlertComponent
message={message || error}
type={message ? 'warning' : 'failure'}
Expand All @@ -470,7 +470,7 @@ const UserDashBoard = () => {

</div>
<div className="cursor-pointer">
{error !== '' &&
{(error !== '' || ecoMessage !== '') &&
<AlertComponent
message={ecoMessage || error}
type={message ? 'warning' : 'failure'}
Expand Down

0 comments on commit 46b10c7

Please sign in to comment.