diff --git a/packages/next-drupal/src/use-menu.tsx b/packages/next-drupal/src/use-menu.tsx index edf5da9a..441a2a43 100644 --- a/packages/next-drupal/src/use-menu.tsx +++ b/packages/next-drupal/src/use-menu.tsx @@ -1,5 +1,5 @@ import { useRouter } from "next/router" -import * as React from "react" +import { useEffect, useState } from "react" import { getMenu } from "./get-menu" import type { DrupalMenuLinkContent } from "./types" @@ -12,14 +12,14 @@ export function useMenu( isLoading: boolean } { const router = useRouter() - const [data, setData] = React.useState<{ + const [data, setData] = useState<{ items: T[] tree: T[] }>(null) - const [error, setError] = React.useState(null) - const [isLoading, setIsLoading] = React.useState(false) + const [error, setError] = useState(null) + const [isLoading, setIsLoading] = useState(false) - React.useEffect(() => { + useEffect(() => { const fetchMenuItems = async () => { setIsLoading(true) try {