Skip to content

Profectus / features/challenges/challenge / setupAutoComplete

Function: setupAutoComplete() ​

setupAutoComplete(challenge, autoActive, exitOnComplete): WatchStopHandle

This will automatically complete a challenge when it's requirements are met.

Parameters ​

challenge ​

Challenge

The challenge to auto-complete

autoActive ​

MaybeRefOrGetter<boolean> = true

Whether or not auto-completing should currently occur

exitOnComplete ​

boolean = true

Whether or not to exit the challenge after auto-completion

Returns ​

WatchStopHandle

Defined in ​

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