From 6c53c5ee326199427fb39846b2d3e6025cba0090 Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Tue, 18 Mar 2025 19:37:30 +0800 Subject: [PATCH] refactor(page): replace accordion structure with LanguageServerAccordion component --- .../@admin/settings/language-server/page.tsx | 54 +++---------------- 1 file changed, 6 insertions(+), 48 deletions(-) diff --git a/src/app/(app)/dashboard/@admin/settings/language-server/page.tsx b/src/app/(app)/dashboard/@admin/settings/language-server/page.tsx index 2726dce..bf4bacf 100644 --- a/src/app/(app)/dashboard/@admin/settings/language-server/page.tsx +++ b/src/app/(app)/dashboard/@admin/settings/language-server/page.tsx @@ -1,58 +1,16 @@ -import { - Accordion, - AccordionContent, - AccordionItem, - AccordionTrigger, -} from "@/components/ui/accordion"; import { EditorLanguage } from "@prisma/client"; import { getLanguageServerConfig } from "@/app/actions/language-server"; -import { SettingsLanguageServerForm } from "@/app/(app)/dashboard/@admin/settings/language-server/form"; +import { LanguageServerAccordion } from "@/app/(app)/dashboard/@admin/settings/language-server/accordion"; export default async function SettingsLanguageServerPage() { const languages = Object.values(EditorLanguage); - const configPromises = languages.map(async (language) => { - return { - language, - config: await getLanguageServerConfig(language), - }; - }); + const configPromises = languages.map(async (language) => ({ + language, + config: await getLanguageServerConfig(language), + })); const configs = await Promise.all(configPromises); - return ( - - {configs.map(({ language, config }) => ( - - - {language.toUpperCase()} - - -
- -
-
-
- ))} -
- ); + return ; }