SpectatorMatchList first test

This commit is contained in:
LuckyLaszlo
2022-12-21 19:35:40 +01:00
parent de00a4fdcd
commit a1472c9059
3 changed files with 54 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
<script lang="ts">
import MatchListElem from "../pieces/MatchListElem.svelte";
let arr = [
{
id: "match-01",
playerOneUsername: "toto",
playerTwoUsername: "bruno",
},
{
id: "match-02",
playerOneUsername: "bertand",
playerTwoUsername: "cassandre",
},
{
id: "match-03",
playerOneUsername: "madeleine",
playerTwoUsername: "jack",
},
];
</script>
<!-- -->
<menu>
{#each arr as match}
<MatchListElem match={match}/>
{/each}
</menu>
<!-- -->
<style>
</style>

View File

@@ -0,0 +1,18 @@
<script lang="ts">
export let match: {
id: string,
playerOneUsername: string,
playerTwoUsername: string
};
</script>
<!-- -->
<li>
{match.id} "{match.playerOneUsername}" VS "{match.playerTwoUsername}"
</li>
<!-- -->
<style>
</style>

View File

@@ -5,7 +5,8 @@ import TwoFactorAuthentication from '../pages/TwoFactorAuthentication.svelte';
import UnauthorizedAccessPage from '../pages/UnauthorizedAccessPage.svelte';
import { wrap } from 'svelte-spa-router/wrap'
import TestPage from '../pages/TmpTestPage.svelte';
import Game from '../pages/game/Game.svelte'
import Game from '../pages/game/Game.svelte';
import SpectatorMatchList from '../pages/SpectatorMatchList.svelte';
@@ -13,6 +14,7 @@ export const primaryRoutes = {
'/': SplashPage,
'/2fa': TwoFactorAuthentication,
'/game': Game,
'/matchlist': SpectatorMatchList,
'/test': wrap({
component: TestPage,
conditions: [