SpectatorMatchList first test
This commit is contained in:
@@ -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>
|
||||||
@@ -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>
|
||||||
@@ -5,7 +5,8 @@ import TwoFactorAuthentication from '../pages/TwoFactorAuthentication.svelte';
|
|||||||
import UnauthorizedAccessPage from '../pages/UnauthorizedAccessPage.svelte';
|
import UnauthorizedAccessPage from '../pages/UnauthorizedAccessPage.svelte';
|
||||||
import { wrap } from 'svelte-spa-router/wrap'
|
import { wrap } from 'svelte-spa-router/wrap'
|
||||||
import TestPage from '../pages/TmpTestPage.svelte';
|
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,
|
'/': SplashPage,
|
||||||
'/2fa': TwoFactorAuthentication,
|
'/2fa': TwoFactorAuthentication,
|
||||||
'/game': Game,
|
'/game': Game,
|
||||||
|
'/matchlist': SpectatorMatchList,
|
||||||
'/test': wrap({
|
'/test': wrap({
|
||||||
component: TestPage,
|
component: TestPage,
|
||||||
conditions: [
|
conditions: [
|
||||||
|
|||||||
Reference in New Issue
Block a user