Skip to content

Commit

Permalink
add basic alerts for short code and toll free
Browse files Browse the repository at this point in the history
  • Loading branch information
engelhartrueben committed Sep 17, 2024
1 parent a77ee71 commit 607273a
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/containers/AdminPhoneNumberInventory.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,49 @@ class AdminPhoneNumberInventory extends React.Component {
</Button>
</DialogActions>
</Dialog>
<Snackbar
open={this.state.queriedShortcodes}
autoHideDuration={2000}
onClose={() => {
this.setState({
queriedShortCodes: false}
);
}}
>
{(this.state.responseShortCodes
// && this.state.responseShortCodes.success
) ?
<Alert elevation={6} variant="filled" severity="success">
You checked for short codes. Yay!
</Alert>
:
<Alert elevation={6} variant="filled" severity="error">
Something went wrong!
</Alert>
}

</Snackbar>
<Snackbar
open={this.state.queriedTollfree}
autoHideDuration={2000}
onClose={() => {
this.setState({
queriedTollfree: false}
);
}}
>
{(this.state.responseTollFree
// && this.state.responseTollFree.success
) ?
<Alert elevation={6} variant="filled" severity="success">
You checked for toll free. Yay!
</Alert>
:
<Alert elevation={6} variant="filled" severity="error">
Something went wrong!
</Alert>
}
</Snackbar>
</div>
);
}
Expand Down

0 comments on commit 607273a

Please sign in to comment.