Skip to content

Profectus / features/challenges/challenge / createActiveChallenge

Function: createActiveChallenge() ​

createActiveChallenge(challenges): Ref<Challenge | null>

Utility for taking an array of challenges where only one may be active at a time, and giving a ref to the one currently active (or null if none are active)

Parameters ​

challenges ​

Challenge[]

The list of challenges that are mutually exclusive

Returns ​

Ref<Challenge | null>

Defined in ​

profectus/src/features/challenges/challenge.tsx:275