diff --git a/src/app/playground/components/code-editor.tsx b/src/app/playground/components/code-editor.tsx index c71b4dd..4bf03f3 100644 --- a/src/app/playground/components/code-editor.tsx +++ b/src/app/playground/components/code-editor.tsx @@ -26,8 +26,10 @@ const ADDITIONAL_THEMES = [ const ADDITIONAL_LANGUAGES = [ "c", + "cpp", "java", "python", + "typescript", ] as const satisfies Parameters[0]["langs"]; export function CodeEditor() { diff --git a/src/app/playground/components/playground-sidebar.tsx b/src/app/playground/components/playground-sidebar.tsx index ae23804..5b9c2ec 100644 --- a/src/app/playground/components/playground-sidebar.tsx +++ b/src/app/playground/components/playground-sidebar.tsx @@ -1,5 +1,12 @@ "use client"; +import { + COriginal, + CplusplusOriginal, + JavaOriginal, + PythonOriginal, + TypescriptOriginal, +} from "devicons-react"; import * as React from "react"; import { Sidebar, @@ -22,7 +29,6 @@ import { import * as actions from "@/actions"; import { useTranslations } from "next-intl"; import { useSession } from "next-auth/react"; -import { COriginal, JavaOriginal, PythonOriginal } from "devicons-react"; import { useCodeEditorStore } from "@/store/codeEditorStore"; import { ChevronRight, File, Folder, FolderOpen } from "lucide-react"; @@ -137,10 +143,14 @@ function Tree({ item }: { item: FileTree }) { if (fileExtension === "c") { fileIcon = ; + } else if (fileExtension === "cpp") { + fileIcon = ; } else if (fileExtension === "java") { fileIcon = ; } else if (fileExtension === "py") { fileIcon = ; + } else if (fileExtension === "ts") { + fileIcon = ; } const [isOpen, setIsOpen] = React.useState(false); @@ -148,8 +158,10 @@ function Tree({ item }: { item: FileTree }) { const langMap: { [key: string]: string } = { c: "c", + cpp: "cpp", java: "java", py: "python", + ts: "typescript", }; const handleFileClick = async () => {