aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/src/routes/golf/watch/apps/Gaming.tsx
blob: a17b71e53f8a68d9d1af9cc8ad082ce4959a82da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
type Props = {
  gameId: number;
  problem: string | null;
  scoreA: number | null;
  codeA: string | null;
  scoreB: number | null;
  codeB: string | null;
};

export default ({ problem, scoreA, codeA, scoreB, codeB }: Props) => {
  return (
    <>
      <div style={{ display: 'flex', flexDirection: 'column' }}>
        <div style={{ display: 'flex', flex: 1, justifyContent: 'center' }}>
          {problem}
        </div>
        <div style={{ display: 'flex', flex: 3 }}>
          <div style={{ display: 'flex', flex: 3, flexDirection: 'column' }}>
            <div style={{ flex: 1, justifyContent: 'center' }}>
              {scoreA}
            </div>
            <div style={{ flex: 3 }}>
              <pre><code>{codeA}</code></pre>
            </div>
          </div>
          <div style={{ display: 'flex', flex: 3, flexDirection: 'column' }}>
            <div style={{ flex: 1, justifyContent: 'center' }}>
              {scoreB}
            </div>
            <div style={{ flex: 3 }}>
              <pre><code>{codeB}</code></pre>
            </div>
          </div>
        </div>
      </div>
    </>
  );
};