Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const getUserData = state => {
const userId = getUserId(state);
const gameId = getGameId(state);
return userId && gameId && dataToJS(state.firebase, `games/${gameId}/merchants/${userId}`);
};
export const getGameData = state => {
const gameId = getGameId(state);
return gameId && dataToJS(state.firebase, `games/${gameId}`);
};
export const getRoomData = state => {
return dataToJS(state.firebase, 'rooms');
};
const mapStateToProps = (state) => ({
userId: getUserId(state),
playerMap: getPlayerMap(state),
historyRef: dataToJS(state.firebase, `gameLog/${state.game.id}`)
})
const mapStateToProps = ({ firebase }) => ({
schedules: dataToJS(firebase, 'schedules'),
});