diff --git a/src/components/RandomIDComponent.jsx b/src/components/RandomIDComponent.jsx new file mode 100644 index 0000000..95d3dc8 --- /dev/null +++ b/src/components/RandomIDComponent.jsx @@ -0,0 +1,15 @@ +import React from "react"; +import { getTranslation } from "../core/i18n/I18NHandler"; + +var randomId = 0; + +function RandomIDComponent() { + randomId = Math.floor(Math.random() * 89999) + 10000; + return (

Your ID:

{randomId}

); +} + +export function getUserID() { + return randomId; +} + +export default RandomIDComponent; \ No newline at end of file diff --git a/src/pages/TestInfoPage.jsx b/src/pages/TestInfoPage.jsx index ccf7d95..d88050b 100644 --- a/src/pages/TestInfoPage.jsx +++ b/src/pages/TestInfoPage.jsx @@ -1,9 +1,11 @@ import React from "react"; import InfoPageComponent from "../components/InfoPageComponent"; +import RandomIDComponent from "../components/RandomIDComponent"; function TestInfoPage({redirectLoc}) { return (

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

+
); }