import React from 'react';
import { FaTimes } from 'react-icons/fa';
import './CloseButton.css';

export default (
  <button
    className="close"
    onClick={() => {
      // eslint-disable-next-line no-undef
      var application = fin.desktop.Application.getCurrent();
      application.close();
    }}
  >
    <FaTimes />
  </button>
);

import React from 'react';
import { FaTimes } from 'react-icons/fa';
import './CloseButton.css';

export default (
  <button
    className="close"
    onClick={() => window.fin.Window.getCurrentSync().close()}
  >
    <FaTimes />
  </button>
);

Use simpler close button logic
Use simpler close button logic
