import React from 'react';
import Link from 'next/link';
import { AiOutlineShopping } from 'react-icons/ai'
import { useState } from 'react';
import { Cart } from './';
import { useStateContext} from '../context/StateContext';
const handleSearch = (event) => {
event.preventDefault();
// Redirect to search page with the search query as a query parameter
window.location.href = /search?query=${searchQuery};
};
import React from 'react'; import Link from 'next/link'; import { AiOutlineShopping } from 'react-icons/ai' import { useState } from 'react'; import { Cart } from './'; import { useStateContext} from '../context/StateContext';
const Navbar = () => { const { showCart, setShowCart, totalQuantities } = useStateContext(); const [searchQuery, setSearchQuery] = useState('');
const handleSearch = (event) => { event.preventDefault(); // Redirect to search page with the search query as a query parameter window.location.href =
/search?query=${searchQuery}
; };const handleSearchQueryChange = (event) => { setSearchQuery(event.target.value); };
return (
Barwa
{showCart &&) }
export default Navbar