Skip to content

Commit

Permalink
refactor(next-drupal): use explicit imports from react
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAlbin committed Oct 18, 2023
1 parent d0e83a6 commit c1bc419
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/next-drupal/src/use-menu.tsx
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -12,14 +12,14 @@ export function useMenu<T extends DrupalMenuLinkContent>(
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<boolean>(false)
const [error, setError] = useState(null)
const [isLoading, setIsLoading] = useState<boolean>(false)

React.useEffect(() => {
useEffect(() => {
const fetchMenuItems = async () => {
setIsLoading(true)
try {
Expand Down

0 comments on commit c1bc419

Please sign in to comment.