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 b67396a commit 3b55ce8
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/components/User/UserDashBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,21 +455,23 @@ const UserDashBoard = () => {
<>
<div className="px-4 pt-6">
<div className="cursor-pointer">

<AlertComponent
message={message}
type={message ? 'warning' : 'failure'}
viewButton={viewButton}
path={pathRoutes.users.invitations}
onAlertClose={() => {
setMessage('');
setError('');
}}
/>

{message && message.length > 0 &&

<AlertComponent
message={message}
type={message ? 'warning' : 'failure'}
viewButton={viewButton}
path={pathRoutes.users.invitations}
onAlertClose={() => {
setMessage('');
setError('');
}}
/>
}


</div>
<div className="cursor-pointer">
{/* <div className="cursor-pointer">
<AlertComponent
message={ecoMessage}
Expand All @@ -482,7 +484,7 @@ const UserDashBoard = () => {
}}
/>
</div>
</div> */}
{walletData && walletData.length > 0 ? (
<></>
) : (
Expand Down

0 comments on commit 3b55ce8

Please sign in to comment.