From ee48efee557876aa114516043b11348ce460b214 Mon Sep 17 00:00:00 2001 From: Josh MacAdam Date: Wed, 21 Feb 2024 10:05:07 -0800 Subject: [PATCH] somehow forgot this --- web/src/app/page.tsx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 web/src/app/page.tsx diff --git a/web/src/app/page.tsx b/web/src/app/page.tsx new file mode 100644 index 0000000..71440eb --- /dev/null +++ b/web/src/app/page.tsx @@ -0,0 +1,22 @@ +'use client'; + +import React, { useEffect, useState } from 'react'; +import RenderLevel from '@/components/RenderLevel'; + +export default function Page() { + const [simId, setSimId] = useState(null); + + useEffect(() => { + const params = new URLSearchParams(window.location.search); + const sim_id = params.get('sim_id'); + if (sim_id) { + setSimId(sim_id); + } + }, []); + + if (!simId) { + return null; + } + + return ; +}