diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index 9c6e7a2..5d22e2b 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -1,8 +1,8 @@ -import { AppBar, Box, IconButton, Link, Toolbar } from '@mui/material'; -import React from 'react'; +import { AppBar, Box, IconButton, InputBase, Link, Toolbar } from '@mui/material'; +import React, { useState } from 'react'; import FlexBetween from '../FlexBetween'; import logo from '/assets/logo.png'; -import { Link as RouterLink } from 'react-router-dom'; +import { Link as RouterLink, useNavigate } from 'react-router-dom'; /* ASSETS */ import './navbar.styles.css'; @@ -14,6 +14,9 @@ import { } from '@mui/icons-material'; const Navbar = () => { + const navigate = useNavigate(); + const [search, setSearch] = useState(false); + return ( { - - + + + setSearch(!search)}> @@ -55,7 +66,7 @@ const Navbar = () => { - + navigate('/cart')}> diff --git a/src/scenes/Cart/index.tsx b/src/scenes/Cart/index.tsx index 0c10787..9a2c8cc 100644 --- a/src/scenes/Cart/index.tsx +++ b/src/scenes/Cart/index.tsx @@ -3,9 +3,12 @@ import Header from '../../components/Header'; import FlexBetween from '../../components/FlexBetween'; import ItemsTable from './ItemsTable'; import useStyles from './useStyles'; +import { useNavigate } from 'react-router-dom'; const Cart = () => { + const navigate = useNavigate(); const { classes } = useStyles(); + return ( <>
@@ -35,7 +38,9 @@ const Cart = () => { - + diff --git a/src/scenes/Checkout/index.tsx b/src/scenes/Checkout/index.tsx index b320115..2d59098 100644 --- a/src/scenes/Checkout/index.tsx +++ b/src/scenes/Checkout/index.tsx @@ -91,7 +91,7 @@ const Checkout = () => { {/* RIGHT */} - + @@ -108,7 +108,9 @@ const Checkout = () => { Subtotal Rs 250,000.00 Rs 250,000.00 - Rs 250,000.00 + + Rs 250,000.00 +