grid wrapper + newest products + latest blogs

This commit is contained in:
hamid zarghami
2025-08-09 12:40:38 +03:30
parent b224b0c521
commit 90b47740c6
14 changed files with 617 additions and 3 deletions
+2 -2
View File
@@ -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 -1
View File
@@ -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,