@@ -3,7 +3,8 @@ import cn from 'classnames';
3import { Grid, H3, B, Text, CheckboxInput } from 'indigo-react';
3import { Grid, H3, B, Text, CheckboxInput } from 'indigo-react';
5import { useCheckboxInput } from 'lib/useInputs';
5import { useCheckboxInput } from 'lib/useInputs';
6−import { useLocalRouter } from 'lib/LocalRouter';
6+import { useHistory } from 'store/history';
7+import { setDisclaimerCookie } from 'lib/disclaimerCookie';
8import View from 'components/View';
9import View from 'components/View';
9import { ForwardButton } from 'components/Buttons';
10import { ForwardButton } from 'components/Buttons';
@@ -12,13 +13,16 @@ import WarningBox from 'components/WarningBox';
12const TEXT_STYLE = 'f5';
13const TEXT_STYLE = 'f5';
14export default function ActivateDisclaimer() {
15export default function ActivateDisclaimer() {
15− const { push, names } = useLocalRouter();
16+ const { popAndPush, names } = useHistory();
16 const [understoodInput, { data: isUnderstood }] = useCheckboxInput({
17 const [understoodInput, { data: isUnderstood }] = useCheckboxInput({
17 name: 'checkbox',
18 name: 'checkbox',
18 label: 'I acknowledge and understand these rights',
19 label: 'I acknowledge and understand these rights',
21− const goToPassport = useCallback(() => push(names.PASSPORT), [push, names]);
22+ const goToPassport = useCallback(() => {
23+ setDisclaimerCookie();
24+ popAndPush(names.LANDING);
25+ }, [popAndPush, names]);