-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63b0eeb
commit 986b6dc
Showing
6 changed files
with
42 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<div class="flex flex-col items-center justify-evenly h-dvh text-text_white"> | ||
<h1 class="text-center text-5xl font-bold">hiiii :3</h1> | ||
<a class="text-center text-2xl rounded bg-btn_grey px-4 py-2 font-bold" href="/scout"> | ||
<a class="text-center text-2xl rounded bg-btn_grey px-4 py-2 font-bold" href="/queue"> | ||
scout | ||
</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
<script lang="ts"> | ||
import { goto } from '$app/navigation'; | ||
import { io } from 'socket.io-client'; | ||
const socket = io(); | ||
socket.on('messageFromServer', (message) => { | ||
console.log(message); | ||
socket.on('connect', () => { | ||
console.log(socket.id); | ||
socket.emit('join_queue'); | ||
}); | ||
socket.on('time_to_scout', ([team_key, color]: [string, 'red' | 'blue']) => { | ||
goto(`/scout/${team_key}_${color}`); | ||
}); | ||
</script> | ||
|
||
<h1>In Queue</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { PageLoad } from './$types'; | ||
import { error } from '@sveltejs/kit'; | ||
|
||
export const load: PageLoad = ({ params }) => { | ||
const [match_key, team_key, color]: [string, string, 'red' | 'blue'] | undefined = | ||
params.team_data?.split('_') as [string, string, 'red' | 'blue']; | ||
|
||
// TODO: Check if this does anything | ||
if (!team_key) return error(400, 'Bad query parameters'); | ||
console.log('match_key: ' + color); | ||
return { | ||
match_key: match_key, | ||
team_key: team_key, | ||
color: color | ||
}; | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters