message: support undo action button
diff: @@ -12,6 +12,7 @@ import {
  } from "@material-ui/core";
  import PlayIcon from "@material-ui/icons/PlayArrow";
  import RefreshIcon from "@material-ui/icons/Refresh";
  +import UndoIcon from "@material-ui/icons/Undo";
  import { SnackContext } from "contexts/snackContext";
  import { cloudFunction } from "firebase/callables";
  @@ -41,19 +42,28 @@ export default function Action({
  const { createdAt, updatedAt, id, ref, ...docData } = row;
  const { callableName } = column as any;
  -
  + const action = !value
  + ? "run"
  + : value.undo
  + ? "undo"
  + : value.redo
  + ? "redo"
  + : "";
  const [isRunning, setIsRunning] = useState(false);
  const disabled = column.editable === false;
  const snack = useContext(SnackContext);
  const handleRun = () => {
  setIsRunning(true);
  - cloudFunction(
  - callableName,
  - {
  + const data = {
  ref: { path: ref.path, id: ref.id },
  row: sanitiseRowData(Object.assign({}, docData)),
  column,
  - },
  + action,
  + };
  + console.log(data);
  + cloudFunction(
  + callableName,
  + data,
  response => {
  const { message, cellValue } = response.data;
  setIsRunning(false);
  @@ -74,12 +84,18 @@ export default function Action({
  color="secondary"
  className={classes.fab}
  onClick={handleRun}
  - disabled={isRunning || !!(hasRan && !value.redo) || disabled}
  + disabled={
  + isRunning || !!(hasRan && !value.redo && !value.undo) || disabled
  + }
  >
  {isRunning ? (
  <CircularProgress color="secondary" size={16} thickness={5.6} />
  ) : hasRan ? (
  + value.undo ? (
  + <UndoIcon />
  + ) : (
  <RefreshIcon />
  + )
  ) : (
  <PlayIcon />
  )}
  