diff --git a/client/src/graphql/teams/GetAllTeamsQuery.js b/client/src/graphql/teams/GetAllTeamsQuery.js index 084a0715b..1417f997e 100644 --- a/client/src/graphql/teams/GetAllTeamsQuery.js +++ b/client/src/graphql/teams/GetAllTeamsQuery.js @@ -3,7 +3,7 @@ import gql from 'graphql-tag' export const GET_ALL_TEAMS_QUERY = gql` query teamsQuery { - TeamsModuleTeams { + teams_Teams { edges { node { id diff --git a/client/src/views/teams/components/TeamsList.js b/client/src/views/teams/components/TeamsList.js index 5d2a3693f..b6df7a4ca 100644 --- a/client/src/views/teams/components/TeamsList.js +++ b/client/src/views/teams/components/TeamsList.js @@ -39,10 +39,10 @@ const styles = theme => ({ } }) -export const TeamsList = ({ classes, match }) => ( - - {({ loading, error, data }) => { - console.log('GET_ALL_TEAMS: ', loading, error, data, match) +export const TeamsList = ({ classes, match, client }) => ( + + {({ loading, error, data, ...props }) => { + console.log('GET_ALL_TEAMS: ', loading, error, data, match, props) let slug = null if (!isEmpty(match.params) && match.params.slug) slug = match.params.slug @@ -58,12 +58,12 @@ export const TeamsList = ({ classes, match }) => ( }) } if (!loading && !error) { - if (data.teams.edges.length > 0) { + if (data.teams_Teams.edges.length > 0) { if (slug !== null) { return ( {!loading && - data.teams.edges.map(team => { + data.teams_Teams.edges.map(team => { if (team.node.slug === slug) { return ( @@ -89,7 +89,7 @@ export const TeamsList = ({ classes, match }) => ( {!loading && - data.teams.edges.map(team => ( + data.teams_Teams.edges.map(team => ( ( TeamsList.propTypes = { classes: PropTypes.object.isRequired, - match: PropTypes.object + match: PropTypes.object, + client: PropTypes.client } export default withStyles(styles)(TeamsList)