aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/src/watch.jsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-19 19:05:55 +0900
committernsfisis <nsfisis@gmail.com>2024-07-19 19:19:55 +0900
commitdf5abfc272a151c51f0e5e82214cf7aff8cfa880 (patch)
tree87395be420f16296fab56b55a03f83f87af59366 /frontend/src/watch.jsx
parentb0662e8add4864fed69f49a4a5cfb0d8e26523a8 (diff)
downloadphperkaigi-2025-albatross-df5abfc272a151c51f0e5e82214cf7aff8cfa880.tar.gz
phperkaigi-2025-albatross-df5abfc272a151c51f0e5e82214cf7aff8cfa880.tar.zst
phperkaigi-2025-albatross-df5abfc272a151c51f0e5e82214cf7aff8cfa880.zip
initial commit
Diffstat (limited to 'frontend/src/watch.jsx')
-rw-r--r--frontend/src/watch.jsx11
1 files changed, 11 insertions, 0 deletions
diff --git a/frontend/src/watch.jsx b/frontend/src/watch.jsx
new file mode 100644
index 0000000..c8dcda1
--- /dev/null
+++ b/frontend/src/watch.jsx
@@ -0,0 +1,11 @@
+import { createRoot } from 'react-dom/client';
+import App from './watch/App.jsx';
+
+const url = new URL(window.location.href);
+const path = url.pathname;
+const match = path.match(/\/golf\/(\d+)\/watch\/$/);
+if (match) {
+ const gameId = match[1];
+
+ createRoot(document.getElementById('app')).render(<App gameId={gameId} />);
+}