Skip to content

Commit

Permalink
feat: update css GameStats
Browse files Browse the repository at this point in the history
  • Loading branch information
MarineChillaud committed Sep 28, 2023
1 parent 9b50ecd commit 8ef300d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/components/activities/GameStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const GameStats = ({ gameResponses, choices, country, userMap, users }: GameStat
});

return (
<Stack spacing={1} direction="column" alignItems="center" justifyContent="space-between">
<Stack spacing={1} direction="column" alignItems="center" justifyContent="flex-start">
<Stack spacing={1} direction="row" alignItems="center" justifyContent="center" m={2}>
<span>{`${responseCount} réponse${responseCount > 1 ? 's' : ''}`} </span>
<Flag country={country} size={'small'} />
Expand All @@ -45,14 +45,14 @@ const GameStats = ({ gameResponses, choices, country, userMap, users }: GameStat
choices.map((choice) => (
<>
{responsesByChoice[choice] ? (
<Stack direction="row" spacing={2} pb={1} alignItems="center" justifyContent="center">
<Stack direction="row" spacing={0} py={1} alignItems="center" justifyContent="center">
{responsesByChoice[choice]?.map((response) => {
const user = users[userMap[response.userId]];
return <AvatarImg key={response.id} user={user} style={{ width: '24px', height: '24px', margin: '10px 5px' }} />;
})}
</Stack>
) : (
<>TOTO</>
<Stack key={choice} style={{ height: '24px', margin: '10px 5px' }}></Stack>
)}
</>
))}
Expand Down
30 changes: 14 additions & 16 deletions src/pages/creer-un-jeu/mimique/jouer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,22 +321,20 @@ const PlayMimic = () => {
)}
</div>
</div>
<Grid container spacing={1} alignItems="flex-start" justifyContent="space-between" style={{ flex: 1 }}>
<Grid item xs={6} display="flex" justifyContent="center">
<RadioGroup row defaultValue={RadioBoxValues.NEW}>
{Object.keys(radioListComponentMapper).map((value: string, index: number) => {
return (
<RadioNextGame
key={index}
value={value as RadioBoxValues}
Icon={radioListComponentMapper[value as RadioBoxValues]}
onChange={handleRadioButtonChange}
checked={selectedValue === value}
/>
);
})}
</RadioGroup>
</Grid>
<Grid container spacing={1} style={{ flex: 1, justifyContent: 'space-around' }}>
<RadioGroup row defaultValue={RadioBoxValues.NEW}>
{Object.keys(radioListComponentMapper).map((value: string, index: number) => {
return (
<RadioNextGame
key={index}
value={value as RadioBoxValues}
Icon={radioListComponentMapper[value as RadioBoxValues]}
onChange={handleRadioButtonChange}
checked={selectedValue === value}
/>
);
})}
</RadioGroup>
</Grid>
<Grid
container
Expand Down

0 comments on commit 8ef300d

Please sign in to comment.