diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 67f08e4..563a70f 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -2,10 +2,20 @@ import { generateId } from './estimation/estimation.js'; import { goto } from '$app/navigation'; + let roomId = ''; + function startARoom() { const roomId = generateId(); goto(`/estimation/${roomId}`); } + + function joinRoom() { + const match = roomId.match(/\/estimation\/(.+)/); + if (match) { + const roomId = match[1]; + goto(`/estimation/${roomId}`); + } + }