aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components/Gaming
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-20 22:18:14 +0900
committernsfisis <nsfisis@gmail.com>2025-03-20 22:18:14 +0900
commitcca0f63e50684d6806697589b620ee4b4c1b21b5 (patch)
tree592bf93ac15a325b9b86e9455c2007f857907efc /frontend/app/components/Gaming
parentf1701822ed069d70841e8b40392e55bb28bf3eb6 (diff)
downloadphperkaigi-2025-albatross-cca0f63e50684d6806697589b620ee4b4c1b21b5.tar.gz
phperkaigi-2025-albatross-cca0f63e50684d6806697589b620ee4b4c1b21b5.tar.zst
phperkaigi-2025-albatross-cca0f63e50684d6806697589b620ee4b4c1b21b5.zip
feat(frontend): improve watch page layout
Diffstat (limited to 'frontend/app/components/Gaming')
-rw-r--r--frontend/app/components/Gaming/ProblemColumn.tsx (renamed from frontend/app/components/Gaming/Problem.tsx)12
-rw-r--r--frontend/app/components/Gaming/SubmitResult.tsx18
2 files changed, 8 insertions, 22 deletions
diff --git a/frontend/app/components/Gaming/Problem.tsx b/frontend/app/components/Gaming/ProblemColumn.tsx
index e2f1487..2a57afd 100644
--- a/frontend/app/components/Gaming/Problem.tsx
+++ b/frontend/app/components/Gaming/ProblemColumn.tsx
@@ -1,4 +1,5 @@
import BorderedContainerWithCaption from "../BorderedContainerWithCaption";
+import TitledColumn from "../TitledColumn";
import CodeBlock from "./CodeBlock";
import InlineCode from "./InlineCode";
@@ -8,10 +9,13 @@ type Props = {
sampleCode: string;
};
-export default function Problem({ title, description, sampleCode }: Props) {
+export default function ProblemColumn({
+ title,
+ description,
+ sampleCode,
+}: Props) {
return (
- <div className="p-4 flex flex-col gap-4">
- <div className="text-center text-xl font-bold">{title}</div>
+ <TitledColumn title={title}>
<BorderedContainerWithCaption caption="問題">
<pre className="text-gray-700 whitespace-pre-wrap break-words">
{description}
@@ -51,6 +55,6 @@ export default function Problem({ title, description, sampleCode }: Props) {
</p>
</div>
</BorderedContainerWithCaption>
- </div>
+ </TitledColumn>
);
}
diff --git a/frontend/app/components/Gaming/SubmitResult.tsx b/frontend/app/components/Gaming/SubmitResult.tsx
deleted file mode 100644
index ea75b6b..0000000
--- a/frontend/app/components/Gaming/SubmitResult.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import type { components } from "../../api/schema";
-import SubmitStatusLabel from "../SubmitStatusLabel";
-
-type Props = {
- status: components["schemas"]["ExecutionStatus"];
-};
-
-export default function SubmitResult({ status }: Props) {
- return (
- <div className="flex flex-col gap-2">
- <div className="flex">
- <div className="grow font-bold text-xl text-center">
- <SubmitStatusLabel status={status} />
- </div>
- </div>
- </div>
- );
-}