Skip to content

Commit

Permalink
fix: prevent Provider to be regenerated
Browse files Browse the repository at this point in the history
  • Loading branch information
Grafikart committed Dec 8, 2023
1 parent ccf65eb commit 925097a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useLunatic } from '@inseefr/lunatic';
import { memo, useEffect, useMemo, useRef } from 'react';
import {memo, useEffect, useMemo, useRef, useState} from 'react';
import ButtonContinue from './buttons/continue/index';
import D from 'i18n';
import { isSequenceOrSubsequenceComponent } from 'utils/components/deduceState';
Expand All @@ -18,6 +18,7 @@ function noDataChange() {

const preferences = ['COLLECTED'];
const features = ['VTL', 'MD'];
const custom = { RouterLink: Link }

const missingShortcut = { dontKnow: 'f2', refused: 'f4' };

Expand Down Expand Up @@ -68,7 +69,7 @@ function LightOrchestrator({
});

lunaticStateRef.current = useLunatic(source, initialData, {
custom: { RouterLink: Link },
custom,
lastReachedPage: lastReachedPage ?? '1',
features,
pagination,
Expand Down

0 comments on commit 925097a

Please sign in to comment.