grid wrapper + newest products + latest blogs
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
import { HambergerMenu, ArrowLeft2 } from 'iconsax-react'
|
||||
import { FC, useState, useRef, useEffect } from 'react'
|
||||
import Image from 'next/image'
|
||||
import { useCategories } from '../hooks/useShareData'
|
||||
import { useGetCategories } from '../hooks/useShareData'
|
||||
import { Category } from '../types/SharedTypes'
|
||||
|
||||
const Menu: FC = () => {
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
const [hoveredPath, setHoveredPath] = useState<Category[]>([])
|
||||
const { data, isLoading } = useCategories()
|
||||
const { data, isLoading } = useGetCategories()
|
||||
const menuRef = useRef<HTMLDivElement>(null)
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getCategories } from "../service/ShareService";
|
||||
|
||||
export const useCategories = () => {
|
||||
export const useGetCategories = () => {
|
||||
return useQuery({
|
||||
queryKey: ["categories"],
|
||||
queryFn: getCategories,
|
||||
|
||||
Reference in New Issue
Block a user