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.
This commit is contained in:
ngc2207 2024-12-14 23:23:50 +08:00
parent 20d790c5e0
commit 2cdd9adf3e

View File

@ -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"