CEC-758 Add SMS send page and result (#173)
* Add SMS send and result pages * Update snapshot Co-authored-by: jwu-fisker <jwu@fiskerinc.com>
This commit is contained in:
39
src/components/SMS/Send/ViewResult.jsx
Normal file
39
src/components/SMS/Send/ViewResult.jsx
Normal file
@@ -0,0 +1,39 @@
|
||||
import { Button } from "@material-ui/core";
|
||||
import React from "react";
|
||||
|
||||
import useStyles from "../../useStyles";
|
||||
|
||||
const ViewResult = ({ result, onChangeView }) => {
|
||||
const classes = useStyles();
|
||||
|
||||
const onNewSMS = (event) => {
|
||||
event.preventDefault();
|
||||
if (!onChangeView) return;
|
||||
onChangeView();
|
||||
};
|
||||
return (
|
||||
<div>
|
||||
<h2>View Result</h2>
|
||||
<ul>
|
||||
{Object.keys(result).map((key) => (
|
||||
<li key={key}>
|
||||
{key}:{result[key]}
|
||||
<br />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<Button
|
||||
type="submit"
|
||||
fullWidth
|
||||
variant="contained"
|
||||
color="primary"
|
||||
className={classes.submit}
|
||||
onClick={onNewSMS}
|
||||
>
|
||||
Done
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ViewResult;
|
||||
Reference in New Issue
Block a user