From 2cdd9adf3e735eae9d7af028605c73282dcf575e Mon Sep 17 00:00:00 2001 From: ngc2207 Date: Sat, 14 Dec 2024 23:23:50 +0800 Subject: [PATCH] refactor: import actions from specific module - Changed the import statement for `retrieveTreeStructure` from a default import to a named import from the `@/actions` module. - This change improves code readability and adheres to best practices for module imports. --- src/app/playground/components/playground-sidebar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/playground/components/playground-sidebar.tsx b/src/app/playground/components/playground-sidebar.tsx index 17e7aaf..886345c 100644 --- a/src/app/playground/components/playground-sidebar.tsx +++ b/src/app/playground/components/playground-sidebar.tsx @@ -19,8 +19,8 @@ import { CollapsibleContent, CollapsibleTrigger, } from "@/components/ui/collapsible"; +import * as actions from "@/actions"; import { useSession } from "next-auth/react"; -import { retrieveTreeStructure } from "@/actions"; import { COriginal, JavaOriginal } from "devicons-react"; import { ChevronRight, File, Folder, FolderOpen } from "lucide-react"; @@ -87,7 +87,7 @@ export function PlaygroundSidebar({ React.useEffect(() => { async function fetchFileTree() { if (username) { - const tree: GitEntry[] = await retrieveTreeStructure( + const tree: GitEntry[] = await actions.retrieveTreeStructure( username, "playground", "main"