mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-09 00:54:21 +02:00
Fix showing inactive teams in /equipes
This commit is contained in:
parent
68919fc55b
commit
b6533795c4
@ -8,9 +8,11 @@ const TeamList: React.FC = (): JSX.Element | null => {
|
|||||||
const teams = useSelector(selectSortedTeams)
|
const teams = useSelector(selectSortedTeams)
|
||||||
if (!teams || teams.length === 0) return null
|
if (!teams || teams.length === 0) return null
|
||||||
|
|
||||||
|
const shownTeams = teams.filter((team) => team?.status !== "inactive")
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className={styles.teamList}>
|
<ul className={styles.teamList}>
|
||||||
{teams.map((team: any) => (
|
{shownTeams.map((team: any) => (
|
||||||
<TeamItem team={team} key={team.id} />
|
<TeamItem team={team} key={team.id} />
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user