From f662c0832f1f7f45a4e1a926f3ec5a1d21e80fa7 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 19 Aug 2024 04:12:48 +0900 Subject: feat(frontend): adjust style of submit result --- frontend/app/components/Gaming/CodeBlock.tsx | 2 +- frontend/app/components/Gaming/SubmitResult.tsx | 47 +++++++++++-------------- 2 files changed, 21 insertions(+), 28 deletions(-) (limited to 'frontend/app') diff --git a/frontend/app/components/Gaming/CodeBlock.tsx b/frontend/app/components/Gaming/CodeBlock.tsx index fc14b63..b7d45c0 100644 --- a/frontend/app/components/Gaming/CodeBlock.tsx +++ b/frontend/app/components/Gaming/CodeBlock.tsx @@ -13,7 +13,7 @@ export default function CodeBlock({ code, language }: Props) { const highlighted = highlight(code, languages[language]!, language); return ( -
+		
 			
 		
); diff --git a/frontend/app/components/Gaming/SubmitResult.tsx b/frontend/app/components/Gaming/SubmitResult.tsx index 6f4cb0e..93e08a7 100644 --- a/frontend/app/components/Gaming/SubmitResult.tsx +++ b/frontend/app/components/Gaming/SubmitResult.tsx @@ -1,5 +1,3 @@ -import { faArrowDown } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import React from "react"; import type { SubmitResult } from "../../models/SubmitResult"; import BorderedContainer from "../BorderedContainer"; @@ -20,32 +18,27 @@ export default function SubmitResult({ result, submitButton }: Props) { -
    - {result.execResults.map((r, idx) => ( -
  • -
    - - {idx !== result.execResults.length - 1 && ( -
    - +
      + {result.execResults.map((r) => ( +
    • + +
      +
      +
      + +
      +
      {r.label}
      - )} -
      -
      - -
      {r.label}
      -
      -									
      -										{r.stdout}
      -										{r.stderr}
      -									
      -								
      -
      -
      + {r.stdout + r.stderr && ( +
      +										
      +											{r.stdout}
      +											{r.stderr}
      +										
      +									
      + )} +
    +
  • ))}
-- cgit v1.2.3-70-g09d2