webamp/js/components/MainWindow/ActionButtons.tsx
Jordan Eldredge 5407426325 Fix the stop button
Aparently window.stop() is a thing, and ESLint/TypeScript let me do this. Sigh.

A potential fix: https://github.com/facebook/create-react-app/pull/1840
2019-08-20 07:43:23 -07:00

22 lines
790 B
TypeScript

import React from "react";
import * as Actions from "../../actionCreators";
import { useActionCreator } from "../../hooks";
const ActionButtons = React.memo(() => {
const previous = useActionCreator(Actions.previous);
const play = useActionCreator(Actions.play);
const pause = useActionCreator(Actions.pause);
const next = useActionCreator(Actions.next);
const stop = useActionCreator(Actions.stop);
return (
<div className="actions">
<div id="previous" onClick={previous} title="Previous Track" />
<div id="play" onClick={play} title="Play" />
<div id="pause" onClick={pause} title="Pause" />
<div id="stop" onClick={stop} title="Stop" />
<div id="next" onClick={next} title="Next Track" />
</div>
);
});
export default ActionButtons;