mirror of
https://github.com/usatiuk/ustk-todolist.git
synced 2025-10-28 23:57:49 +01:00
remove FetchButton
This commit is contained in:
@@ -46,7 +46,7 @@ body {
|
||||
height: 100%;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 1;
|
||||
color: #888888;
|
||||
color: #555555;
|
||||
border: none;
|
||||
background: none;
|
||||
transition: 0.1s ease-in-out;
|
||||
|
||||
@@ -19,6 +19,7 @@ function Input({ onClick, styles }) {
|
||||
return (
|
||||
<div style={styles} id="inputs">
|
||||
<input
|
||||
aria-label="todo text"
|
||||
ref={node => {
|
||||
input = node;
|
||||
}}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ButtonBase } from '@material-ui/core';
|
||||
|
||||
import { fetchLists } from '../../actions/lists';
|
||||
|
||||
function FetchButton({ onClick, children }) {
|
||||
return (
|
||||
<ButtonBase
|
||||
style={{
|
||||
marginLeft: 0,
|
||||
marginRight: 'auto',
|
||||
padding: '0 1rem',
|
||||
}}
|
||||
onClick={e => {
|
||||
e.preventDefault();
|
||||
onClick();
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</ButtonBase>
|
||||
);
|
||||
}
|
||||
|
||||
FetchButton.propTypes = {
|
||||
onClick: PropTypes.func.isRequired,
|
||||
children: PropTypes.node.isRequired,
|
||||
};
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return {
|
||||
onClick: () => dispatch(fetchLists()),
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(
|
||||
null,
|
||||
mapDispatchToProps,
|
||||
)(FetchButton);
|
||||
Reference in New Issue
Block a user