|
@ -5,6 +5,7 @@ import { getTranslation } from "../core/i18n/I18NHandler"; |
|
|
|
|
|
|
|
|
var randomId = 0; |
|
|
var randomId = 0; |
|
|
|
|
|
|
|
|
|
|
|
// State for saving participant ID globally. |
|
|
export const participantIdLogState = createStore( |
|
|
export const participantIdLogState = createStore( |
|
|
persist( |
|
|
persist( |
|
|
() => ({ |
|
|
() => ({ |
|
@ -19,6 +20,7 @@ export const participantIdLogState = createStore( |
|
|
|
|
|
|
|
|
const { getState, setState } = participantIdLogState; |
|
|
const { getState, setState } = participantIdLogState; |
|
|
|
|
|
|
|
|
|
|
|
// Can only be called once. :) |
|
|
function RandomIDComponent() { |
|
|
function RandomIDComponent() { |
|
|
randomId = Math.floor(Math.random() * 89999) + 10000; |
|
|
randomId = Math.floor(Math.random() * 89999) + 10000; |
|
|
setState({ participant_id: "" + randomId }) |
|
|
setState({ participant_id: "" + randomId }) |
|
|