Function
The learner profile status to judge
The status that triggers the redirect, and its target path
The personal pages are guarded on the client, because only the browser knows
whether this device holds a profile. Nothing is decided while the status is
unknown, so no page flashes a redirect during hydration.
replace rather than push: the guarded page was never somewhere the
learner meant to be, so Back should not return to it.
Sends the learner to another page once their profile status matches a rule.