Frank-Schaeske / ScoutingHelper

https://scouting-helper.vercel.app
0 stars 0 forks source link

US11 Filter the player list by position #21

Open Frank-Schaeske opened 11 months ago

Frank-Schaeske commented 11 months ago

Value Proposition

As a user I want to be able to filter the player list by position So that I can view my saved goalkeepers, defenders, midfielders or attackers separately ​

Description

Scribble US11

Acceptance Criteria

Tasks

CJAkkuec commented 11 months ago

Create a new component PlayerFilteredByPosition

🤓

Frank-Schaeske commented 11 months ago

Thanks for your comment CJ! However, I'm unsure if the renaming really makes sense, since the component is actually the filter.

CJAkkuec commented 11 months ago

I see 🤔 I'm not sure where you are at right now in terms of your app architecture, but are you handling the filtering of players and a general player overview on different pages?

Either way, if PlayerFilterByPosition is the component that lets the user select the position to filter for, I'd probably even argue it should be PositionRadioButtons. Something like PlayerFilterByPosition would be a more apt name for a derived state variable. Although I'd probably go for something like this, maybe ...


const [position, setPosition] = useState("");

//fancy radio buttons component

const filteredPlayers = //fancy filter function

return (

{filteredPlayers.map(//fancy mapping)}

)