diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-09-05 20:52:43 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-09-05 20:53:02 +0900 |
| commit | 82d3cf35c3c6b85b48c94dd6301c8bf718669b8d (patch) | |
| tree | c09c53a3ae1f51aba02902d4f32ffafdf7fb562a /frontend/app/components/Gaming/CodePopover.tsx | |
| parent | dd1c68425120fca008a3b10991c865ea586c7002 (diff) | |
| download | iosdc-japan-2025-albatross-82d3cf35c3c6b85b48c94dd6301c8bf718669b8d.tar.gz iosdc-japan-2025-albatross-82d3cf35c3c6b85b48c94dd6301c8bf718669b8d.tar.zst iosdc-japan-2025-albatross-82d3cf35c3c6b85b48c94dd6301c8bf718669b8d.zip | |
feat(frontend): support swift language
Diffstat (limited to 'frontend/app/components/Gaming/CodePopover.tsx')
| -rw-r--r-- | frontend/app/components/Gaming/CodePopover.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/frontend/app/components/Gaming/CodePopover.tsx b/frontend/app/components/Gaming/CodePopover.tsx index a574a77..91245df 100644 --- a/frontend/app/components/Gaming/CodePopover.tsx +++ b/frontend/app/components/Gaming/CodePopover.tsx @@ -2,15 +2,17 @@ import { Popover } from "@base-ui-components/react/popover"; import { faCode, faXmark } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { calcCodeSize } from "../../states/play"; +import type { SupportedLanguage } from "../../types/SupportedLanguage"; import BorderedContainer from "../BorderedContainer"; import CodeBlock from "../Gaming/CodeBlock"; type Props = { code: string; + language: SupportedLanguage; }; -export default function CodePopover({ code }: Props) { - const codeSize = calcCodeSize(code); +export default function CodePopover({ code, language }: Props) { + const codeSize = calcCodeSize(code, language); return ( <Popover.Root> @@ -33,7 +35,7 @@ export default function CodePopover({ code }: Props) { /> </Popover.Close> </div> - <CodeBlock code={code} language="php" /> + <CodeBlock code={code} language={language} /> </BorderedContainer> </Popover.Popup> </Popover.Positioner> |
