import { sum } from 'lodash'; import { Link } from 'react-router-dom'; import { useSelector } from 'react-redux'; // material-ui import { useTheme, styled } from '@mui/material/styles'; import { Fab, Badge, IconButton } from '@mui/material'; // assets import ShoppingCartTwoToneIcon from '@mui/icons-material/ShoppingCartTwoTone'; import { DefaultRootStateProps } from 'types'; import { CartProductStateProps } from 'types/cart'; const StyledBadge = styled(Badge)(({ theme }) => ({ '& .MuiBadge-badge': { right: 0, top: 3, border: `2px solid ${theme.palette.background.paper}`, padding: '0 4px' } })); // ==============================|| CART ITEMS - FLOATING BUTTON ||============================== // const FloatingCart = () => { const theme = useTheme(); const cart = useSelector((state: DefaultRootStateProps) => state.cart); const totalQuantity = sum(cart.checkout.products.map((item: CartProductStateProps) => item.quantity)); return ( ); }; export default FloatingCart;