import { Button } from "antd";
import React from "react";
import ipcTypes from "../../../ipc.types";
const { ipcRenderer } = window;

export default function WatcherStopMolecule(buttonProps) {
  const handleClick = () => {
    ipcRenderer.send(ipcTypes.fileWatcher.toMain.stop);
  };

  return <Button {...buttonProps} onClick={handleClick}>Stop Watcher</Button>;
}
