Skip to content

Commit

Permalink
fix(wallet): fix crash when deleting dapps
Browse files Browse the repository at this point in the history
  • Loading branch information
samsiegart authored and mergify-bot committed Dec 30, 2021
1 parent a9895c4 commit 51f78ae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/wallet/ui/src/views/Dapps.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const DappsWithoutContext = ({ dapps }) => {

const remove = ({ actions }) => E(actions).delete();

const DappCard = dapp => {
const DappCard = ({ dapp }) => {
const [anchorEl, setAnchorEl] = useState(null);
const handleClick = event => {
setAnchorEl(event.currentTarget);
Expand All @@ -29,7 +29,7 @@ export const DappsWithoutContext = ({ dapps }) => {
const isPopoverOpen = Boolean(anchorEl);

return (
<div className="Dapp" key={dapp.id}>
<div className="Dapp">
<Card>
<div className="DappContent">
<IconButton
Expand Down Expand Up @@ -67,7 +67,8 @@ export const DappsWithoutContext = ({ dapps }) => {
);
};

const dappCards = (dapps && dapps.map(DappCard)) ?? (
const dappCards = (dapps &&
dapps.map(dapp => <DappCard dapp={dapp} key={dapp.id} />)) ?? (
<CircularProgress style={{ margin: 'auto' }} />
);

Expand Down

0 comments on commit 51f78ae

Please sign in to comment.