Closed paulywill closed 6 years ago
@makkoli : is there any reason some of the buttons on the dashboard would stop working?
Issue confirmed on Slack channel.
I'm trying to test if the issue is because of the depreciation of material-ui and reference @material-ui/core instead in CreateLeagueSelector.jsx
ie.
import React from 'react';
import PropTypes from 'prop-types';
import {
Card,
CardActions,
CardTitle
} from '@material-ui/core/Card';
import CreateLeagueButton from './CreateLeagueButton.jsx';
import { sports } from '../sports.js';
import { cssCreateLeague } from '../styles';
// Creates a list of different buttons for selecting
// a sport type for the new league
// Once a sport type is selected, the proper form will be rendered
const CreateLeagueSelector = ({onSelect, selectedSport})=> (
<Card style={cssCreateLeague.card.style}>
<CardTitle
subtitle='Choose a sport'
subtitleColor={cssCreateLeague.card.title.subtitleColor}
title='Create a New League'
titleColor={cssCreateLeague.card.title.titleColor}
/>
<CardActions>
{sports.map((sport, i) => {
return (
<CreateLeagueButton
active={selectedSport === sport.name}
icon={sport.icon}
key={i}
label={sport.name}
onClick={onSelect}
/>
);
})
}
</CardActions>
</Card>
);
CreateLeagueSelector.propTypes = {
onSelect: PropTypes.func,
selectedSport: PropTypes.string
};
export default CreateLeagueSelector;
However the Eslint in my Atom is picking up the following:
Error ESLint Unable to resolve path to module '@material-ui/core/Card'. (import/no-unresolved) 7:8
Even though I added and updated the package.json @material-ui is still not being added to the webpack.
After studying the history of TravisCI builds I git checkout 74a6fb9 which was the last successful build.
The dashboard appears to functional at this point.
Some of the recent commits will have have to be checked as to which causing the issue.
@ahstein3521 : what were the features you were implementing in b1982a2?
I figured it out. The onTouchTap event has been deprecated from material-ui and needed to be replaced with onClick in the CreateLeagueButton.jsx file it should work now, I submitted a pull request [https://github.com/freeCodeCamp/league-for-good/pull/109]
@lieberscott Can you check the other views/panels?
ie the Games list icon is not working, but the Teams roaster list icon is for mine.
@paulywill Ahh, yes, same here. It seems there are onTouchTap handlers throughout the code. I'm making my way through to replace them all with onClick. I believe the games icon you referenced is here ...
client > src > components > dashboard > seasons > seasons_list > seasonLink.jsx
changing onTouchTap to onClick should work there. Let me know. Meanwhile I'll make a new PR when I think I've replaced all the onTouchTap's
I just updated the PR, I think I got them all working
@lieberscott, nice! There may be a few more.
The delete button under games doesn't appear to work.
Nor the back button when editing a game.
This is where some more TDD and tests would catch these ones.
Need some confirmation... but I have tried to generate a new clone from the repo and the dashboard does not appear to be working for any of the buttons.
Is anyone else having this issue with a fresh copy?