The value for the promptBeforeIdle property must be less than the timeout property

395 Views Asked by At

I'm using the react-idle-timer library to prompt users on idle. This is how I have integrated it.

  const eventsTimer = useIdleTimer({
    element: document,
    startOnMount: false,
    startManually: true,
    name: "events-timer",
    onAction: createPageEvent,
    events: ["click", "mousemove", "keydown", "touchstart", "change", "select", "scroll"],
  });

  // USER ACTIVITY TIMER
  const activityTimer = useIdleTimer({
    crossTab: true,
    syncTimers: 200,
    startOnMount: false,
    startManually: true,
    name: "activity-timer",
    timeout: expireTestTime * 60 * 1000, // in miliseconds
    onIdle: () => sendMsgToBackground({ action: ACTION.USER_ACTIVITY_IDLE }),
  });

It was working fine earlier but recently when I did the npm i to install the required libraries, it stopped working. Now I'm getting the error like The value for the promptBeforeIdle property must be less than the timeout property idletimer.

I'm not using the promptBeforeIdle property but still I'm getting this error. Is there any solution for this?

0

There are 0 best solutions below