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:
parent
20d790c5e0
commit
2cdd9adf3e
@ -19,8 +19,8 @@ import {
|
|||||||
CollapsibleContent,
|
CollapsibleContent,
|
||||||
CollapsibleTrigger,
|
CollapsibleTrigger,
|
||||||
} from "@/components/ui/collapsible";
|
} from "@/components/ui/collapsible";
|
||||||
|
import * as actions from "@/actions";
|
||||||
import { useSession } from "next-auth/react";
|
import { useSession } from "next-auth/react";
|
||||||
import { retrieveTreeStructure } from "@/actions";
|
|
||||||
import { COriginal, JavaOriginal } from "devicons-react";
|
import { COriginal, JavaOriginal } from "devicons-react";
|
||||||
import { ChevronRight, File, Folder, FolderOpen } from "lucide-react";
|
import { ChevronRight, File, Folder, FolderOpen } from "lucide-react";
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ export function PlaygroundSidebar({
|
|||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
async function fetchFileTree() {
|
async function fetchFileTree() {
|
||||||
if (username) {
|
if (username) {
|
||||||
const tree: GitEntry[] = await retrieveTreeStructure(
|
const tree: GitEntry[] = await actions.retrieveTreeStructure(
|
||||||
username,
|
username,
|
||||||
"playground",
|
"playground",
|
||||||
"main"
|
"main"
|
||||||
|
Loading…
Reference in New Issue
Block a user