From 5f98bd44a4d413f1c2b2dfba6ead09e9b75ed886 Mon Sep 17 00:00:00 2001 From: Denis Thiessen Date: Wed, 5 Jun 2024 14:07:17 +0200 Subject: [PATCH] fix: Removed randomized participant ID due to irrelevancy. --- src/components/RandomIDComponent.jsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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}

); }