From 4bab1ea0901ee96b933fe8c571f088f32ed85321 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 8 Nov 2023 16:49:41 -0800 Subject: [PATCH 01/17] setup files and systems --- src/components/match-card.tsx | 11 ++++++++++- src/routes.ts | 8 ++++++++ src/routes/event.tsx | 10 ++++++++++ src/routes/match-creator.tsx | 9 +++++++++ src/routes/match-editor.tsx | 9 +++++++++ 5 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 src/routes/match-creator.tsx create mode 100644 src/routes/match-editor.tsx diff --git a/src/components/match-card.tsx b/src/components/match-card.tsx index 59843baba..05bb3ee8b 100644 --- a/src/components/match-card.tsx +++ b/src/components/match-card.tsx @@ -5,6 +5,8 @@ import Card from '@/components/card' import { css } from 'linaria' import { memo } from '@/utils/memo' import clsx from 'clsx' +import IconButton from './icon-button' +import { mdiPencil } from '@mdi/js' interface MatchCardProps { match: { @@ -17,6 +19,7 @@ interface MatchCardProps { eventKey: string link?: boolean class?: string + isAdmin?: boolean } const matchCardStyle = css` @@ -83,7 +86,7 @@ const blueStyle = css` ` export const MatchDetailsCard = memo( - ({ match, eventKey, link, class: className }: MatchCardProps) => { + ({ match, eventKey, link, class: className, isAdmin }: MatchCardProps) => { const matchName = formatMatchKey(match.key) const createTeamLinks = (teams: string[]) => @@ -110,6 +113,12 @@ export const MatchDetailsCard = memo( {matchName.num && (
{`Match ${matchName.num}`}
)} + {isAdmin && ( + + )} {match.time && (