@@ -3,7 +3,8 @@ import cn from 'classnames';
33import { Grid, H3, B, Text, CheckboxInput } from 'indigo-react';
44
55import { useCheckboxInput } from 'lib/useInputs';
6−import { useLocalRouter } from 'lib/LocalRouter';
6+import { useHistory } from 'store/history';
7+import { setDisclaimerCookie } from 'lib/disclaimerCookie';
78
89import View from 'components/View';
910import { ForwardButton } from 'components/Buttons';
@@ -12,13 +13,16 @@ import WarningBox from 'components/WarningBox';
1213const TEXT_STYLE = 'f5';
1314
1415export default function ActivateDisclaimer() {
15− const { push, names } = useLocalRouter();
16+ const { popAndPush, names } = useHistory();
1617 const [understoodInput, { data: isUnderstood }] = useCheckboxInput({
1718 name: 'checkbox',
1819 label: 'I acknowledge and understand these rights',
1920 });
2021
21− const goToPassport = useCallback(() => push(names.PASSPORT), [push, names]);
22+ const goToPassport = useCallback(() => {
23+ setDisclaimerCookie();
24+ popAndPush(names.LANDING);
25+ }, [popAndPush, names]);
2226
2327 return (
2428 <View>