mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 13:56:29 +02:00
teams filtered and sorted
This commit is contained in:
@@ -2,10 +2,10 @@ import React, { memo } from "react"
|
||||
import { useSelector } from "react-redux"
|
||||
import styles from "./styles.module.scss"
|
||||
import TeamItem from "./TeamItem"
|
||||
import { selectTeamList } from "../../store/teamList"
|
||||
import { selectSortedActiveTeams } from "../../store/teamList"
|
||||
|
||||
const TeamList: React.FC = (): JSX.Element | null => {
|
||||
const teams = useSelector(selectTeamList)
|
||||
const teams = useSelector(selectSortedActiveTeams)
|
||||
if (!teams || teams.length === 0) return null
|
||||
|
||||
return (
|
||||
|
@@ -5,7 +5,7 @@ import set from "lodash/set"
|
||||
import classnames from "classnames"
|
||||
import styles from "./styles.module.scss"
|
||||
import { useUserTeamWishes } from "../teamWishes.utils"
|
||||
import { fetchTeamListIfNeed, selectTeamList } from "../../../store/teamList"
|
||||
import { fetchTeamListIfNeed, selectSortedActiveTeams } from "../../../store/teamList"
|
||||
import useSelection from "../useSelection"
|
||||
import { fetchVolunteerTeamWishesSetIfNeed } from "../../../store/volunteerTeamWishesSet"
|
||||
import FormButton from "../../Form/FormButton/FormButton"
|
||||
@@ -15,7 +15,7 @@ type Props = {
|
||||
}
|
||||
|
||||
const TeamWishesForm: FC<Props> = ({ afterSubmit }): JSX.Element | null => {
|
||||
const teams = useSelector(selectTeamList)
|
||||
const teams = useSelector(selectSortedActiveTeams)
|
||||
const { selection, setSelection, toggleToSelection, isInSelection } = useSelection()
|
||||
const commentRef = useRef<HTMLTextAreaElement | null>(null)
|
||||
const [userWishes, saveWishes] = useUserTeamWishes()
|
||||
|
Reference in New Issue
Block a user