i need to render this prompt but only when the next url doesn't begin with /calendar/ I tried with window.location.pathname but this only gets the current URL, i need to know the next URL in order to know if i must render or not this prompt, i dont want the prompt gets rendered when URL change from "/calendar/" to "/calendar/information" because it's still the same page
<Prompt
when={(this.props.agendaPlaces.length >=3 && this.props.users.length === 0)}//
message={JSON.stringify({
language: this.props.i18n.language,
header: t('userLeaveConfirmationTitle'),
header2: t('userLeaveConfirmationTitle2'),
content:t('userLeaveConfirmationBody'),
confirm:t('userLeaveConfirmationConfirm'),
cancel:t('userLeaveConfirmationCancel')
})}
/>