diff --git a/src/components/RandomIDComponent.jsx b/src/components/RandomIDComponent.jsx index e7913d1..270b40e 100644 --- a/src/components/RandomIDComponent.jsx +++ b/src/components/RandomIDComponent.jsx @@ -1,9 +1,7 @@ import React from "react"; import { createStore } from "zustand/vanilla"; import { persist, createJSONStorage } from "zustand/middleware"; -import { getTranslation } from "../core/i18n/I18NHandler"; - -var randomId = 0; +import { PARTICIPANT_NUMBER } from "../core/Constants"; // State for saving participant ID globally. export const participantIdLogState = createStore( @@ -22,12 +20,11 @@ const { getState, setState } = participantIdLogState; // Can only be called once. :) function RandomIDComponent() { - randomId = Math.floor(Math.random() * 89999) + 10000; - setState({ participant_id: "" + randomId }); + setState({ participant_id: "" + PARTICIPANT_NUMBER }); return (

Your ID:

-

{randomId}

+

{PARTICIPANT_NUMBER}

); }