mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-28 12:36:35 +00:00
Type ListMenu
This commit is contained in:
parent
19de45f5df
commit
315fa0a4f0
1 changed files with 8 additions and 3 deletions
|
|
@ -2,10 +2,15 @@ import React from "react";
|
|||
import { connect } from "react-redux";
|
||||
import { removeAllTracks } from "../../actionCreators";
|
||||
import PlaylistMenu from "./PlaylistMenu";
|
||||
import { Dispatch } from "../../types";
|
||||
|
||||
/* eslint-disable no-alert */
|
||||
|
||||
const ListMenu = props => (
|
||||
interface DispatchProps {
|
||||
removeAllTracks: () => void;
|
||||
}
|
||||
|
||||
const ListMenu = (props: DispatchProps) => (
|
||||
<PlaylistMenu id="playlist-list-menu">
|
||||
<div className="new-list" onClick={props.removeAllTracks} />
|
||||
<div
|
||||
|
|
@ -19,8 +24,8 @@ const ListMenu = props => (
|
|||
</PlaylistMenu>
|
||||
);
|
||||
|
||||
const mapDispatchToProps = {
|
||||
removeAllTracks
|
||||
const mapDispatchToProps = (dispatch: Dispatch): DispatchProps => {
|
||||
return { removeAllTracks };
|
||||
};
|
||||
export default connect(
|
||||
null,
|
||||
Loading…
Add table
Add a link
Reference in a new issue