mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-24 02:36:00 +00:00
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
22 lines
790 B
TypeScript
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;
|