diff --git a/minishop/src/App.css b/minishop/src/App.css
deleted file mode 100644
index 4ad480a..0000000
--- a/minishop/src/App.css
+++ /dev/null
@@ -1,40 +0,0 @@
-@import url('https://fonts.googleapis.com/css2?family=Metrophobic&display=swap');
-
-.App {
-
- font-family: 'Metrophobic', sans-serif;
- text-align: center;
- background-image: url("https://media.istockphoto.com/id/586058260/photo/white-wood-panel-texture-background.jpg?s=612x612&w=0&k=20&c=Hcuxx1LJp6O_EHGQAoeN4BNAQX8pIGuQStAOkpwHCBk=");
-
-}
-
-@media (prefers-reduced-motion: no-preference) {
- .App-logo {
- animation: App-logo-spin infinite 20s linear;
- }
-}
-
-.App-header {
- background-color: #282c34;
- min-height: 100vh;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- font-size: calc(10px + 2vmin);
- color: white;
-}
-
-.App-link {
- color: #61dafb;
-}
-
-@keyframes App-logo-spin {
- from {
- transform: rotate(0deg);
- }
-
- to {
- transform: rotate(360deg);
- }
-}
\ No newline at end of file
diff --git a/minishop/src/App.js b/minishop/src/App.js
deleted file mode 100644
index 503cd1c..0000000
--- a/minishop/src/App.js
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import './App.css';
-
-
-
-import Allroute from './Routes/AllRoutes';
-import 'bootstrap/dist/css/bootstrap.min.css';
-import { Box } from '@chakra-ui/react';
-import Footer from './components/Footer/Footer';
-function App() {
-
-
- return (
-
- );
-}
-
-export default App;
diff --git a/minishop/src/DemoPagesBySachin/DLogin.jsx b/minishop/src/DemoPagesBySachin/DLogin.jsx
deleted file mode 100644
index 6ccc591..0000000
--- a/minishop/src/DemoPagesBySachin/DLogin.jsx
+++ /dev/null
@@ -1,201 +0,0 @@
-import React, { useContext, useRef, useState } from "react";
-import {
- useToast,
- Button,
- useDisclosure,
- Flex,
- Heading,
- Text,
- FormControl,
- Input,
- Stack,
-} from "@chakra-ui/react";
-import { Link, useNavigate } from "react-router-dom";
-import "./Login.css";
-import GoogleButton from "react-google-button";
-// import { AuthContext } from "../Pages/login&signup/AuthContextProvider";
-import {
- Modal,
- ModalBody,
- ModalCloseButton,
- ModalContent,
- ModalOverlay,
-} from "@chakra-ui/modal";
-import {useDispatch, useSelector} from 'react-redux'
-import { loginWithGoogle, userLogin } from "../redux/Auth/auth.actions";
-import { useEffect } from "react";
-const userInit = {
- email: "",
- password: "",
-};
-
-
-
-const DLogin = () => {
- const {isauth, userData}=useSelector(val=>val.authUser)
- const nav = useNavigate()
- const dispatch = useDispatch()
- const toast = useToast();
- const [user, setUser] = useState(userInit);
- const [error, setError] = useState("");
- // const { logout } = useContext(AuthContext);
- const emailRef = useRef(null);
- // const logoutUser = async () => {
- // try {
- // await logout();
- // } catch (error) {
- // console.log(error.message);
- // }
- // };
- // const { loginUser, forgotPassword, continueWithGoogle } =useContext(AuthContext);
- const { isOpen, onOpen, onClose } = useDisclosure();
- const handleChange = (e) => {
- setUser({ ...user, [e.target.type]: e.target.value });
- };
- const handleSubmit = (e) => {
- e.preventDefault();
- dispatch(userLogin(user))
- };
-
- useEffect(()=>{
- if(isauth === true){
- window.location.href='/'
- } // went to the home page after login
- },[isauth])
-
- const forgotPasswordHandler = async () => {
- const email = emailRef.current.value;
- if (email)
- try {
- // await forgotPassword(email);
- console.log("RESET mail sent");
- } catch (e) {
- setError(e.message);
- console.log(e.message);
- }
- };
- return (
-
- );
-};
-export default DLogin;
\ No newline at end of file
diff --git a/minishop/src/DemoPagesBySachin/DSign.jsx b/minishop/src/DemoPagesBySachin/DSign.jsx
deleted file mode 100644
index de88c02..0000000
--- a/minishop/src/DemoPagesBySachin/DSign.jsx
+++ /dev/null
@@ -1,88 +0,0 @@
-import React, { useContext, useState } from "react";
-import { useToast, Button } from "@chakra-ui/react";
-import { Link } from "react-router-dom";
-import "./Sign.css";
-import { AuthContext } from "../Pages/login&signup/AuthContextProvider";
-const userInit = {
- email: "",
- password: "",
-};
-const DSign = () => {
- const toast = useToast();
- const [user, setUser] = useState(userInit);
- const [error, setError] = useState("");
- const { createUser } = useContext(AuthContext);
- const handleChange = (e) => {
- setUser({ ...user, [e.target.type]: e.target.value });
- };
- const handleSubmit = async (e) => {
- e.preventDefault();
- try {
- await createUser(user.email, user.password);
- } catch (e) {
- setError(e.message);
- console.log(e.message);
- }
- };
- return (
-
- );
-};
-export default DSign;
\ No newline at end of file
diff --git a/minishop/src/DemoPagesBySachin/DemoSimiler.jsx b/minishop/src/DemoPagesBySachin/DemoSimiler.jsx
deleted file mode 100644
index d0ced2c..0000000
--- a/minishop/src/DemoPagesBySachin/DemoSimiler.jsx
+++ /dev/null
@@ -1,91 +0,0 @@
-import React from "react";
-import "./Demosimiler.scss";
-import { BsStarFill } from "react-icons/bs";
-import { Button, Text, useToast } from "@chakra-ui/react";
-import axios from "axios";
-
-
-import Slider from 'react-slick';
-import 'slick-carousel/slick/slick.css';
-import 'slick-carousel/slick/slick-theme.css';
-import { Link, useNavigate } from "react-router-dom";
-import { FaHeart } from "react-icons/fa";
-
-const DemoSimiler = ({data}) => {
-
- const navigate = useNavigate();
-
- const settings = {
- dots: false,
- infinite: false,
- speed: 500,
- slidesToShow: 4,
- slidesToScroll: 4,
- initialSlide: 0,
- responsive: [
- {
- breakpoint: 1024,
- settings: {
- slidesToShow: 2,
- slidesToScroll: 2,
- infinite: true,
- dots: true,
- },
- },
- {
- breakpoint: 600,
- settings: {
- slidesToShow: 2,
- slidesToScroll: 2,
- initialSlide: 2,
- },
- },
- {
- breakpoint: 480,
- settings: {
- slidesToShow: 1,
- slidesToScroll: 1,
- },
- },
- ],
- };
-
-
- return (
-
-
-
- {
- data?.map((el,index) => (
-
-
-
-
{el.brand}
-
-
- Price: ₹ {el.price}
-
-
-
-
-
navigate(`/data/${el.id}`)}>
- View Details
-
-
-
- ))}
-
-
-
-
-
-
- );
-};
-
-export default DemoSimiler;
diff --git a/minishop/src/DemoPagesBySachin/Demosimiler.scss b/minishop/src/DemoPagesBySachin/Demosimiler.scss
deleted file mode 100644
index f4ac77b..0000000
--- a/minishop/src/DemoPagesBySachin/Demosimiler.scss
+++ /dev/null
@@ -1,93 +0,0 @@
-
-.slick-prev:before, .slick-next:before {
- font-size: 30px;
- color: grey;
-}
-.slick-slide > div {
- width: 75%;
- margin: auto;
- margin: 0 40px;
-}
-.slick-list {
- margin: 0 -10px;
-}
-
-
-.proMainDiv{
- width: 90%;
- margin: auto;
- margin-top: 12px;
-}
-
-.prodiv{
- width: 250px;
- margin: auto;
- height: 350px;
- background-color: white;
- padding: 10px;
- box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
- border-radius: 10px;
-
-}
-.proName{
- font-weight: bolder;
- letter-spacing: 1px;
- font-size: 20px;
-}
-
-.prodiv img{
- width: 100%;
- height: 70%;
- margin: auto;
-}
- .proPrice {
-
- font-size: 18px;
-}
-.proPrice span {
- font-weight: bold;
- font-size: 20px;
- color: rgb(248, 57, 57);
-}
-.addtocart{
- border: 1px solid teal;
- // background-color: rgb(67, 67, 67);
- padding: 5px 15px;
- // color: rgb(255, 251, 251);
- border-radius: 5px;
- margin: auto;
- font-weight: bold;
- box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
- margin-top: 5px;
-}
-.addtocart:hover{
- border: none;
-// color:white;
-background: rgb(103,101,102);
-background: radial-gradient(circle, rgba(103,101,102,1) 0%, rgba(123,147,175,1) 75%);
-}
-.divPriceRating{
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- width: 90%;
- margin: auto;
-}
-.divStar{
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- // border: 1px solid red;
- gap: 5px;
- margin-top: 3px;
- text-align: center;
- align-content: center;
-}
-
-.divStar p{
- margin-top: 2px;
- color: green;
-}
-.divStar span{
- color:rgb(9, 10, 9) ;
-}
\ No newline at end of file
diff --git a/minishop/src/DemoPagesBySachin/Login.css b/minishop/src/DemoPagesBySachin/Login.css
deleted file mode 100644
index fa185d1..0000000
--- a/minishop/src/DemoPagesBySachin/Login.css
+++ /dev/null
@@ -1,174 +0,0 @@
-
-
-
-
- .MainDiv{
- border: 1px solid rgb(249, 249, 249);
-
-height: 620px;
- padding: 70px 0px 0px 0px;
-margin: 0;
-
-box-sizing: border-box;
-font-family: "Poppins", sans-serif;
- }
-.box {
- position: relative;
-
- width: 32%;
- border-radius: 10px;
- height: 500px;
- margin: auto;
- box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
- background: linear-gradient(0deg, black, black, rgb(44, 73, 73));
-}
-
-
-.form {
- position: absolute;
-
- margin: auto;
-
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- text-align: start;
-}
-.form h2 {
- color: #45f3ff;
- font-weight: bold;
- text-align: center;
- font-size: 40px;
-
-}
-.inputBox {
- position: relative;
-
- width: 320px;
- margin: auto;
- justify-content: center;
- text-align: center;
- align-content: center;
- margin-top: 10px;
-}
-.inputBox input {
- position: relative;
- width: 100%;
-
- background: transparent;
- border: none;
- outline: none;
- color: #23242a;
- font-size: 1em;
- letter-spacing: 0.05em;
-
-}
-.inputBox span {
- position: absolute;
- left: 0;
- padding: 20px 0px 10px;
- font-size: 1em;
- color: #8f8f8f;
- pointer-events: none;
- letter-spacing: 0.05em;
- transition: 0.5s;
-}
-.inputBox input:valid ~ span,
-.inputBox input:focus ~ span {
- color: #45f3ff;
- transform: translateX(0px) translateY(-34px);
- font-size: 0.75em;
-}
-.inputBox i {
- position: absolute;
- left: 0;
- bottom: 0;
- width: 100%;
- height: 2px;
- background-color: #00eeff;
- border-radius: 4px;
- transition: 0.5s;
- pointer-events: none;
- z-index: 9;
-}
-.inputBox input:valid ~ i,
-.inputBox input:focus ~ i {
- height: 30px;
-}
-.forgetPass{
-
- color: white;
- text-align: start;
- margin-top: 20px;
-}
-.submit {
- border: none;
- outline: none;
-
- padding: 7px 25px;
- background-color: rgb(206, 204, 201);
- margin-top: 20px;
- border-radius: 4px;
- font-weight: bold;
- letter-spacing: 1px;
- cursor: pointer;
- width: 100%;
- margin-left: -250px;
- margin: auto;
- align-items: start;
- align-content: start;
-}
-.submit:hover {
- opacity: 0.5;
-
-}
-.Divsubmit{
-
- align-items: start;
-text-align: start;
-margin-top: 20px;
-}
-.signDiv {
- display: flex;
- justify-content: space-between;
-
- margin-top: 25px;
- width: 100%;
- align-items: center;
-
- margin-bottom: 20px;
-}
-.signDiv p {
- font-size: 13px;
- letter-spacing: 0.1em;
- color: white;
-}
-.sign {
- color: #45f3ff;
- font-size: 15px;
-
- font-weight: lighter;
-}
-
-.sign:hover {
- cursor: pointer;
- color: red;
-}
-
-
-
-
-
- .orDiv{
-
- color: rgb(153, 151, 151);
- margin-top: 10px;
- margin-bottom: 10px;
-
- text-align: center;
- font-weight: bold;
- }
-.google{
- border: 1px solid red;
-}
\ No newline at end of file
diff --git a/minishop/src/DemoPagesBySachin/Sign.css b/minishop/src/DemoPagesBySachin/Sign.css
deleted file mode 100644
index a3af410..0000000
--- a/minishop/src/DemoPagesBySachin/Sign.css
+++ /dev/null
@@ -1,200 +0,0 @@
-* {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- font-family: "Poppins", sans-serif;
-}
-.box {
- position: relative;
- margin: 10% auto 0;
- width: 50%;
- height: 450px;
-
- background: linear-gradient(0deg, black, black, rgb(44, 73, 73));
-}
-
-.form {
- position: absolute;
- z-index: 10;
- margin: auto;
-
- border-radius: 8px;
- inset: 2px;
- padding: 50px 40px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
-}
-.form h2 {
- color: #45f3ff;
- font-weight: 500;
- font-size: 25px;
- text-align: center;
- letter-spacing: 0.1em;
-}
-.inputBox {
- position: relative;
- width: 60%;
- margin-top: 35px;
-}
-.inputBox input {
- position: relative;
- width: 100%;
- padding: 20px 10px 10px;
- background: transparent;
- border: none;
- outline: none;
- color: #23242a;
- font-size: 1em;
- letter-spacing: 0.05em;
- z-index: 10;
-}
-.inputBox span {
- position: absolute;
- left: 0;
- padding: 20px 0px 10px;
- font-size: 1em;
- color: #8f8f8f;
- pointer-events: none;
- letter-spacing: 0.05em;
- transition: 0.5s;
-}
-.inputBox input:valid ~ span,
-.inputBox input:focus ~ span {
- color: #45f3ff;
- transform: translateX(0px) translateY(-34px);
- font-size: 0.75em;
-}
-.inputBox i {
- position: absolute;
- left: 0;
- bottom: 0;
- width: 100%;
- height: 2px;
- background-color: #00eeff;
- border-radius: 4px;
- transition: 0.5s;
- pointer-events: none;
- z-index: 9;
-}
-.inputBox input:valid ~ i,
-.inputBox input:focus ~ i {
- height: 30px;
-}
-
-.submit {
- border: none;
- outline: none;
- background-color: #45f3ff;
- padding: 11px 25px;
- margin-top: 20px;
- border-radius: 4px;
- font-weight: 700;
- cursor: pointer;
- width: 100px;
- margin-left: -250px;
-}
-.submit:active {
- opacity: 0.5;
-}
-
-.signDiv {
- display: flex;
- justify-content: space-between;
- width: 100%;
- margin-top: 25px;
- width: 60%;
- align-items: center;
-
-}
-.signDiv p {
- font-size: 13px;
- letter-spacing: 0.1em;
- color: white;
-}
-.sign {
- color: #45f3ff;
- font-size: 15px;
-
- font-weight: lighter;
-}
-
-.sign:hover {
- cursor: pointer;
- color: red;
-}
-
-.signDiv1 {
- display: flex;
- justify-content: space-between;
- width: 100%;
-
- margin-top: 10px;
-}
-.signDiv1 p {
- font-size: 13px;
- letter-spacing: 0.1em;
- color: white;
-}
-.sign1 {
- color: #45f3ff;
- font-size: 15px;
-
- font-weight: lighter;
-}
-
-.sign1:hover {
- cursor: pointer;
- color: red;
-}
-
-.inputBox1 {
- position: relative;
- width: 300px;
- margin-top: 20px;
-}
-.inputBox1 input {
- position: relative;
- width: 100%;
- padding: 5px 20px 10px;
- background: transparent;
- border: none;
- outline: none;
- color: #23242a;
- font-size: 1em;
- letter-spacing: 0.05em;
- z-index: 10;
-}
-.inputBox1 span {
- position: absolute;
- left: 0;
- padding: 5px 0px 10px;
- font-size: 1em;
- color: #8f8f8f;
- pointer-events: none;
- letter-spacing: 0.05em;
- transition: 0.5s;
-}
-.inputBox1 input:valid ~ span,
-.inputBox1 input:focus ~ span {
- color: #45f3ff;
- transform: translateX(0px) translateY(-20px);
- font-size: 0.75em;
-}
-.inputBox1 i {
- position: absolute;
- left: 0;
- bottom: 0;
- width: 100%;
- height: 2px;
- background-color: #00eeff;
- border-radius: 4px;
- transition: 0.5s;
- pointer-events: none;
- z-index: 9;
-}
-.inputBox1 input:valid ~ i,
-.inputBox1 input:focus ~ i {
- height: 30px;
-}
diff --git a/minishop/src/Global.scss b/minishop/src/Global.scss
deleted file mode 100644
index 789a225..0000000
--- a/minishop/src/Global.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-$mainColor: #15023a;
-$width: 768px;
-@mixin mobile {
- @media (max-width: #{$width}) {
- @content
- }
-}
\ No newline at end of file
diff --git a/minishop/src/Pages/Cart/Cart.jsx b/minishop/src/Pages/Cart/Cart.jsx
deleted file mode 100644
index 06e8ce4..0000000
--- a/minishop/src/Pages/Cart/Cart.jsx
+++ /dev/null
@@ -1,312 +0,0 @@
-import {
- Button,
- Flex,
- Heading,
- Input,
- InputGroup,
- InputRightElement,
- Modal,
- ModalBody,
- ModalCloseButton,
- ModalContent,
- ModalFooter,
- ModalHeader,
- ModalOverlay,
- Spinner,
- Table,
- Tbody,
- Td,
- Th,
- Thead,
- Tr,
- useDisclosure,
- useToast,
-} from "@chakra-ui/react";
-import React, { useEffect, useState } from "react";
-import { useDispatch, useSelector } from "react-redux";
-import {
- cartActions,
- cartValue,
- deleteCartItem,
- updateCarts,
-} from "../../redux/Cart/Cart.actions";
-import "./Cart.scss";
-import { FaShippingFast } from "react-icons/fa";
-import { AiFillDelete } from "react-icons/ai";
-import { SlMinus, SlPlus } from "react-icons/sl";
-import { RiDeleteBinLine } from "react-icons/ri";
-import { TbDiscount2 } from "react-icons/tb";
-import { Link } from "react-router-dom";
-import Payment from "../checkout/Payment";
-import Navbar from "../../components/Navbar/Navbar";
-import { getUser, userCartUpdate } from "../../redux/AddUser/User.actions";
-const Cart = () => {
- const { isOpen, onOpen, onClose } = useDisclosure();
- const handelOnSubtmi=()=>{
- onClose()
- }
- const {loading , error, cartData,totalPrice} = useSelector((store) => store.cart);
- // console.log('totalPriceSelector:', totalPrice);
-
-
-// console.log( "CartData", cartData)
-
- const dispatch = useDispatch();
- const { isauth, userData } = useSelector((val) => val.authUser);
- const changePrice = (str) => {
- let res = str.replace(/\D/g, "");
- return parseInt(res);
- };
-
- const [totalCartPrice,setTotalCartPrice] = useState(totalPrice);
- const updatePrice = () => {
- setTotalCartPrice(
- cartData.reduce(
- (acc, el) => acc + changePrice(el.price) * el.qty,
- 0
- )
-
- );
- }
- useEffect(() => {
- dispatch(cartActions(userData.name))
-
- updatePrice()
- // }
-}, [cartData.length, dispatch, totalPrice, userData.name]);
-
-const toast = useToast();
- //------Offer Function-------------------------------------------------------------------- //
- const [apply,setApply] = useState("");
- const offerClick = () => {
- // console.log('val:', totalCartPrice)
- // console.log("Apply text",apply);
- if(apply === "VS50"){
- setTotalCartPrice(cartData.reduce(
- (acc, el) => acc + changePrice(el.price) * el.qty *50/100,
- 0
- ));
- setApply("");
- toast({
- title: "Applied Successfully",
- description: "You have added VS50",
- variant: "subtle",
- status:'success',
- position: 'top-right',
- duration: 3000,
- isClosable: true,
- });
- }else if(apply !== "VS50"){
- toast({
- title: "Not Valid",
- description: "You have to add VS50",
- variant: "subtle",
- status:'error',
- position: 'top-right',
- duration: 3000,
- isClosable: true,
- });
- }
- }
-
-
-
- //------Price Details hide Function-------------------------------------------------------------------- //
- const paymentFun = () => {
- dispatch(cartValue(totalCartPrice));
- }
- //------Quantity Increase Function-------------------------------------------------------------------- //
- const quantityIncre = async(el) => {
- let currUser = await dispatch(getUser(userData.id))
-
- let updatedCart = currUser.cart.map(e=>{
- if(e.id===el.id){
- e.qty=e.qty+1;
- return e
- }else{
- return e
- }
- })
- dispatch(updateCarts({...currUser, cart:updatedCart }))
-
- .then(()=> {
- dispatch(cartActions());
- });
- }
- //------Quantity Decrease Function----------------------------------------------------------------------- //
- const quantityDecre = async(el,min) => {
- dispatch(userCartUpdate({...el, min}))
- .then(()=> {
- dispatch(cartActions());
- });
- }
- // Loading And Error
- // if(loading) return Loading... ;
- // if(error) return Error... ;
- return (
- <>
-
-
-
-
-
-
My Cart:[{cartData.length}]
- {/*
Total Ammount:₹{totalCartPrice}
*/}
-
- {cartData.map((e, id) => (
-
-
-
-
-
-
-
- {e.name.length < 25
- ? e.name
- : `${e.name.slice(0, 25)}...`}{" "}
-
-
Price: ₹{e.price}
-
- Rating: {e.raitng ? e.raitng : "4.3"}
-
-
-
-
-
- quantityDecre(e,e.qty--)}
- isDisabled={e.qty === 1}
- color="red" variant="light">
- -
-
- { loading ? : e.qty}
- quantityIncre(e,e.qty++)}
- color="green" variant="light">
- +
-
-
-
-
{
- dispatch(deleteCartItem(e.id)).then(()=> dispatch(cartActions()));
- // dispatch(cartActions());
- }}
- type="button"
- variant="light"
- marginTop="-7px"
- className="delBTN"
- >
-
-
-
-
-
- ))}
-
-
-
-
-
-
Total Ammount
-
₹{totalCartPrice}
-
-
-
-
Delivery Charges
-
Free
-
-
-
-
- Congrats! :smiley: You can use Coupan code for Intresting Offers!{" "}
-
-
-
- setApply(e.target.value)}
- />
-
-
-
- Tap!
-
-
- Apply
-
-
-
-
-
-
-
You can Apply only one Once
-
-
-
-
-
- Check Out
-
-
-
-
-
-
-
-
-
- Woow! You Can use "VS50"
-
-
- Congrats
-
-
-
-
-
-
-
- >
- );
-};
-
-export default Cart
\ No newline at end of file
diff --git a/minishop/src/Pages/Cart/Cart.scss b/minishop/src/Pages/Cart/Cart.scss
deleted file mode 100644
index 19e239d..0000000
--- a/minishop/src/Pages/Cart/Cart.scss
+++ /dev/null
@@ -1,244 +0,0 @@
-@import "../../Global.scss";
-.CartMainDiv{
- // border: 1px solid red;
- width: 100%;
- height: 100vh;
-}
-.BothDiv{
- display: flex;
- flex-direction: row;
- gap: 30px;
- padding: 20px;
- @include mobile{
- flex-direction: column;
- align-items: center;
- }
-}
-.firstDiv{
-// border: 1px solid red;
-width: 60%;
-overflow-y: scroll;
-height: 100vh;
-background-color: white;
-box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
-border-top-right-radius: 20px;
-@include mobile{
- width: 100%;
- align-items: center;
- }
-}
-.CartDetails{
- // border: 1px solid red;
- background-color: white;
- text-align: start;
- font-size: 20px;
- // font-weight: bold;
- padding: 0px 20px;
- border-top-right-radius: 20px;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- font-weight: bold;
- color: gray;
- border: 1px solid rgb(75, 73, 73);
- @include mobile{
- font-size: 18px;
- }
-}
-.cartProDiv{
- // border: 1px dotted rgb(139, 138, 138);
- border-bottom:1px dotted grey;
- width: 100%;
- height: 120px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- gap: 30px;
-margin-bottom: 10px;
-padding: 10px;
-@include mobile{
- flex-direction: column;
- height: 200px;
- }
-// box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
-}
-.CartImgDeatils{
- display: flex;
- width: 60%;
- // border: 1px solid red;
- justify-content: space-between;
- gap: 20px;
- flex-direction: row;
- @include mobile{
- // flex-direction: column;
- width: 100%;
- }
-}
-.CartImgDiv{
- height: 100%;
- width: 30%;
-// background-color: white;
-// box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
- // border: 2px solid rgb(15, 77, 148);
-}
-.CartImgDiv img{
- height: 100px;
- margin: auto;
- @include mobile{
- height: 90px;
- margin: auto;
- }
-}
-.ProDivDetail{
- // border: 1px solid green;
- width: 70%;
- text-align: start;
- justify-content: start;
-}
-.Prodivname{
- font-weight: bold;
- font-size: 20px;
- color: rgb(51, 50, 50);
-}
-.Prodivprice{
- font-size: 18;
- color: red;
- font-weight: bold;
-}
-.Prodivrating{
- color: gray ;
-}
-.QRdiv{
-width: 35%;
-// border: 1px solid green;
-margin: auto;
-display: flex;
-justify-content: space-around;
-@include mobile{
- width:100%;
- // border: 1px solid green;
- justify-content: space-evenly;
- }
-}
-.Qdiv{
- // border: 1px solid red;
- display: flex;
-// width: 40%;
-gap: 5px;
-justify-content: space-around;
-@include mobile{
- margin: auto;
- }
-}
- .Qdiv Button{
- border: 1px solid gray;
- // padding: 2px 2px;
- border-radius: 4px;
- height: 30px;
- width: 10px;
- font-weight: bolder;
- font-size: 20px;
- @include mobile{
- font-size: 18px;
- height: 25px;
- width: 10px;
- }
- }
- .Qdiv Button:hover{
- background-color: rgb(222, 220, 220);
- }
- .delBTN:hover{
- background-color: rgb(224, 223, 223);
- }
- .secondDiv{
- // border: 1px solid rgb(102, 255, 0);
- width: 40%;
- border-bottom-left-radius: 10px;
- border-bottom-right-radius: 10px;
- height: 500px;
- box-shadow: rgba(0, 0, 0, 0.25) 0px 25px 50px -12px; background-color: rgb(255, 255, 255);
- display: flex;
- flex-direction: column;
- @include mobile{
- width: 100%;
- }
-}
-.secHeading{
- // border: 1px solid gray;
- // background-color: rgb(247, 247, 247);
-}
-.secHeading p{
-font-weight: bolder;
-font-size: 20px;
-padding: 5px;
-letter-spacing: 1px;
-}
-.secAmountDiv{
- border: 1px dotted rgb(214, 213, 213);
- display: flex;
- flex-direction: column;
- height: 110px;
- justify-content: space-between;
- padding: 10px 20px;
-}
-.secPriceDiv{
- // border: 1px solid green;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
-}
-.secPriceDiv p{
-font-size: 17px;
-font-weight: bold;
-letter-spacing: 1px;
-}
-.secCoopan
-{
- // border: 1px solid red;
- height: 150px;
- margin-top: 20px;
- display: flex;
- flex-direction: column;
-}
-.secCoopanInput{
- // border: 2px solid green;
- display: flex;
- flex-direction: row;
- justify-content: space-around;
-}
- .secCoopan p{
- color: rgb(255, 6, 6) ;
- font-size: 15px;
- }
- .secCoopanCode p{
- color: black;
- }
- .secCoopanCode h3{
- font-size: 15px;
-// border: 1px solid red;
-margin: auto;
-text-align: center;
-color: gray;
- }
- .Checkout{
- border: 1px solid #DC3545;
- text-align: center;
- background-color: #DF3C4C;
- width: 60%;
- border-radius:5px;
- color: white;
- height: 40px;
- justify-content: center;
- align-content: center;
- font-weight: bold;
- letter-spacing: 1px ;
- align-items: center;
- }
- .Checkout:hover{
- background-color: #D82A3B;
- }
- .tap{
- width: 40px;
- text-align: end;
- margin: auto;
- }
\ No newline at end of file
diff --git a/minishop/src/Pages/Cart/CartComponent.jsx b/minishop/src/Pages/Cart/CartComponent.jsx
deleted file mode 100644
index 035288d..0000000
--- a/minishop/src/Pages/Cart/CartComponent.jsx
+++ /dev/null
@@ -1,69 +0,0 @@
-import React, { useState,useRef } from 'react'
-import {SlMinus ,SlPlus} from "react-icons/sl"
-import {FaShippingFast} from "react-icons/fa"
-
-const CartComponent = ({price,qty,id,cartData}) => {
- const [detailIcon,setDetailIcon] = useState(true);
-
- const detailsHide = () => {
- const targetDiv = document.getElementById("details");
-
- // cartData.map((ele) => {
-
- // if(id === ele.id){
- // if (targetDiv.style.display !== "none"){
- // targetDiv.style.display = "none";
- // setDetailIcon(false);
- // }else{
- // targetDiv.style.display = "block";
- // setDetailIcon(true)
- // }
- // }
- // })
-
-
- // const targetDiv = document.getElementById("cartdetails");
- if (targetDiv.style.display !== "none"){
- targetDiv.style.display = "none";
- setDetailIcon(false);
- }else{
- targetDiv.style.display = "block";
- setDetailIcon(true)
- }
-
-}
-
- return (
-
-
-
-
Rs. {qty *(price + 152)}
-
detailsHide()}>Details{detailIcon ? : }
-
-
-
-
-
-
Price:
- Rs. {qty *(price)}
-
-
-
-
Tax:
- Rs. 152
-
-
-
-
Final Price:
- Rs. {qty *(price + 152)}
-
-
-
-
-
Free shipping
-
-
- )
-}
-
-export default CartComponent;
\ No newline at end of file
diff --git a/minishop/src/Pages/Home/Carousel.jsx b/minishop/src/Pages/Home/Carousel.jsx
deleted file mode 100644
index 33d8c15..0000000
--- a/minishop/src/Pages/Home/Carousel.jsx
+++ /dev/null
@@ -1,84 +0,0 @@
-import Slider from "react-slick";
-import "slick-carousel/slick/slick.css";
-import "slick-carousel/slick/slick-theme.css";
-import { SimpleGrid, Skeleton } from "@chakra-ui/react";
-import "./Home.css";
-import HomeProducts from "./HomeProducts";
-
-export const Carousel = ({dots,
- infinite,
- slidesToShow,
- slidesToScroll,
- autoplay,
- autoplaySpeed,
- pauseOnHover,Img})=> {
-
- var settings = {
- dots:dots,
- infinite:infinite,
- slidesToShow:slidesToShow,
- slidesToScroll:slidesToScroll,
- autoplay:autoplay,
- autoplaySpeed:autoplaySpeed,
- pauseOnHover:pauseOnHover,
- arrows:false
- };
-
- return (
-
-
- {Img && Img.map((el,i)=>(
-
-
-
- ))}
-
-
-
- );
- }
-
-//-------------------------------------------- SingleCarousel ------------------------------------------//
-
- export const SingleCarousel = ({dots,
- infinite,
- slidesToShow,
- slidesToScroll,
- Speed,Img})=> {
-
- var settings = {
- dots:dots,
- infinite:infinite, Speed:Speed,
- slidesToShow:slidesToShow,
- slidesToScroll:slidesToScroll,
- };
-
- return (
-
-
-
-
-
- );
- }
-
-
- export const Loaderskeleton = ()=>{
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
- }
\ No newline at end of file
diff --git a/minishop/src/Pages/Home/Home.css b/minishop/src/Pages/Home/Home.css
deleted file mode 100644
index ea4d23c..0000000
--- a/minishop/src/Pages/Home/Home.css
+++ /dev/null
@@ -1,152 +0,0 @@
-
- /* .slick-prev:before, .slick-next:before {
- font-size: 30px;
- color: grey;
-}
-.slick-slide > div {
- border: 1px solid red;
- width: 100%;
-
-
-}
-.slick-list {
- margin: 0 -10px;
-} */
-
-
-body {
- margin: 0;
- pad: 0;
- /* border: 1px solid red; */
- box-sizing: border-box;
-}
-.container {
- max-width: 100%;
- display: flex;
- gap: 50px;
- flex-wrap: wrap;
- justify-content: center;
-}
-
-.cord {
- position: relative;
- margin: 20px 0;
- width: 250px;
- height: 300px;
- background-color: #fff;
- transform-style: preserve-3d;
- transform: perspective(2000px);
- transition: 1s;
- border-top-right-radius: 25px;
- box-shadow: inset 300px 0 50px rgba(0, 0, 0, 0.5);
- /* border: 1px solid red; */
-}
-.firstName{
- /* border: 1px solid red; */
- background-color: white;
- color: black;
- font-weight: bolder;
- box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
-}
-.cord:hover {
- z-index: 1000;
- transform: perspective(2000px) rotate(-5deg);
- box-shadow: inset 20px 0 50px rgba(0, 0, 0, 0.5);
-}
-.cord .imgBox {
- position: relative;
- width: 100%;
- height: 100%;
- /* border: 1px solid #000; */
- /* box-shadow: rgba(1, 0, 0, 0 ) 0px 4px 0px -1px,
- rgba(0, 0, 0, 0 ) 0px 2px 0px -1px; */
- box-shadow: rgba(14, 30, 37, 0.12) 6px 0px 0px 0px, rgba(14, 30, 37, 0.32) 0px 0px 0px px;
- transform-origin: left;
- box-sizing: border-box;
- background-color: rgb(255, 255, 255);
- /* background-image: url("https://cdn.pixabay.com/photo/2016/11/03/14/06/wood-1794340__340.jpg"); */
- padding: 20px;
- z-index: 1;
- transition: 1s;
- border-top-right-radius: 25px;
-}
-.cord .imgBox img {
- position: absolute;
- top: 0;
- cursor: pointer;
- left: 0;
- border-top-right-radius: 25px;
- width: 100%;
- height: 100%;
-padding: 10px;
-/* border: 1px solid red; */
- /* object-fit: cover; */
-}
-
-.cord:hover .imgBox {
- transform: rotateY(-135deg);
-}
-.details {
- position: absolute;
- top: 0;
- left: 0;
- display: flex;
- flex-direction: column;
- padding: 60px 10px 10px 10px;
- width: 100%;
- border-top-right-radius: 25px;
- height: 90%;
- margin: auto;
- object-fit: cover;
- justify-content: space-around;
- align-items: center;
- /* backgroundIMG-https://cdn.pixabay.com/photo/2016/10/22/01/54/wood-1759566__340.jpg */
- /* background-image: url("https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTplfV2TcDIiFBpJQrq6671D6nwt0NQvTBYEQ&usqp=CAU"); */
-}
-.details h3 {
- color: rgb(0, 0, 0);
- font-size: 30px;
- font-weight: bolder;
- margin: auto;
-}
-.details h5 {
- color: rgb(242, 47, 8);
- font-size: 20px;
- font-weight: bolder;
- margin: auto;
-}
-.heart {
- font-size: 28px;
- color: red;
- cursor: pointer;
- margin-top: 1px;
- margin-left: 30px;
- /* border: 1px solid red; */
-}
-.heart:hover {
- color: rgb(209, 4, 4);
-}
-.viweBtn {
- /* color: white; */
- padding: 5px;
- color: black;
- background: rgb(103,101,102);
- background: radial-gradient(circle, rgba(103,101,102,1) 0%, rgba(155,173,196,1) 0%, rgba(138,161,189,1) 33%, rgba(143,170,203,1) 45%, rgba(148,181,219,1) 68%, rgba(123,147,175,1) 86%, rgba(123,147,175,1) 89%);
- margin-top: 100px;
- border-radius: 5px;
- width: 100px;
- margin: auto;
- font-weight: bolder;
- letter-spacing: 1px;
-}
-.viweBtn:hover{
- /* color: white; */
- background: rgb(103,101,102);
- background: radial-gradient(circle, rgba(103,101,102,1) 0%, rgba(123,147,175,1) 75%);
-}
-.nameHeart {
- display: flex;
-
- justify-content: center;
- align-items: center;
-}
diff --git a/minishop/src/Pages/Home/Home.jsx b/minishop/src/Pages/Home/Home.jsx
deleted file mode 100644
index 4daabb1..0000000
--- a/minishop/src/Pages/Home/Home.jsx
+++ /dev/null
@@ -1,186 +0,0 @@
-import { Box, Heading, IconButton, Image, useBreakpointValue } from "@chakra-ui/react";
-import { useEffect ,useState} from "react";
- import React from "react";
- import "slick-carousel/slick/slick.css";
- import "slick-carousel/slick/slick-theme.css";
-import HomeProducts from "./HomeProducts";
-import "./Home.css";
-import { Carousel } from "./Carousel";
-import { Loaderskeleton } from "./Carousel";
-
-import DemoSimiler from "../../DemoPagesBySachin/DemoSimiler";
-
-// import { BiChevronLeft, BiChevronRight } from "react-icons/bi";
-// import Slider from "react-slick";
-
-
-
-import HomeCarouselDemo from './HomeCarouselDemo';
-import Navbar from "../../components/Navbar/Navbar";
-
-
-function Home() {
- const [data, setData] = useState([]);
- const [loading, setLoading] = useState(false);
-
- const getHomeData =async () => {
- setLoading(true);
- try {
- const res = await fetch("https://lackadaisical-volcano-larch.glitch.me/data");
- const HomeData = await res.json();
- setData(HomeData);
- setLoading(false);
- } catch (error) {
- console.log("e", error);
- setLoading(false);
- }
-}
- useEffect(() => {
- getHomeData()
- document.title = 'Virtual Shop'
-
- }, []);
-
-
-
-
-
- return (
- <>
-
-
-
-
- {/*
-
-
-
- */}
-
- {/* Carousal by kiran */}
-
-
-
-
-{/*--------------------------------- carousel ---------------------------------------*/}
- {/* */}
- {/*--------------------------------- carousel ---------------------------------------*/}
- {loading ? :
- T-Shirt
- item.Categories === "t_shirt")}/>
- }
-
-
- item.Categories === "shoes")} />
-
-{/*--------------------------------- carousel ---------------------------------------*/}
-
- < Image src="https://thegenuineleather.com/wp-content/uploads/2022/10/MEN-LEATHER-JACKET.webp" m='auto' alt='1'/>
-
-
-
-
-{/*--------------------------------- carousel ---------------------------------------*/}
-{loading ? :
- Jacket
- item.Categories === "Jacket")}/>
- }
-
-
-
-
-
- {loading ? :
- Bags
- item.Categories === "bags")} />
- }
-
-
- item.Categories === "t_shirt")} />
-
-
-
-
-
- {loading ? :
- Watch
- item.Categories === "watch")}/>
- }
-
-
-
-
- {loading ? :
- Headphones
- item.Categories === "Headphones")}/>
- }
-
- {loading ? :
- Mobiles
- item.Categories === "mobile")}/>
- }
-
- {loading ? :
- Shoes
- item.Categories === "shoes")}/>
- }
-
-
-
-
- >
- );
-}
-
-export default Home;
-
-
-
-const imagesTop = ['https://s3.thingpic.com/images/WZ/1ChLD86XEtKdLmpiQHdW1nhF.jpeg',
-'https://cdn.shopify.com/s/files/1/0057/8938/4802/files/2000x650_f60dcd57-3f35-4f38-a32f-3f9666996225_1400x.jpg?v=1673538078',
-'https://cdn.shopify.com/s/files/1/0057/8938/4802/files/WSC-Desktop_dad0fc88-3fc8-4ed8-becb-b7901e4b37f4_1400x.jpg?v=1673853393',
-'https://s3.thingpic.com/images/WZ/1ChLD86XEtKdLmpiQHdW1nhF.jpeg',
-'https://s3.thingpic.com/images/WZ/1ChLD86XEtKdLmpiQHdW1nhF.jpeg',
-'https://s3.thingpic.com/images/WZ/1ChLD86XEtKdLmpiQHdW1nhF.jpeg'
-]
-
-const slider2 = ['https://cdn.shopify.com/s/files/1/0057/8938/4802/files/AB1000_445x.jpg?v=1671007984',
-'https://cdn.shopify.com/s/files/1/0057/8938/4802/files/stone_1_445x.png?v=1670244742',
-'https://cdn.shopify.com/s/files/1/0057/8938/4802/files/carousel_banner_445x.png?v=1671097960',
-'https://cdn.shopify.com/s/files/1/0057/8938/4802/files/AB1000_445x.jpg?v=1671007984',
-'https://cdn.shopify.com/s/files/1/0057/8938/4802/files/stone_1_445x.png?v=1670244742',
-'https://cdn.shopify.com/s/files/1/0057/8938/4802/files/carousel_banner_445x.png?v=1671097960',
-'https://cdn.shopify.com/s/files/1/0057/8938/4802/files/AB1000_445x.jpg?v=1671007984',
-'https://cdn.shopify.com/s/files/1/0057/8938/4802/files/stone_1_445x.png?v=1670244742',
-'https://cdn.shopify.com/s/files/1/0057/8938/4802/files/carousel_banner_445x.png?v=1671097960',
-
-
-];
-
-
-
diff --git a/minishop/src/Pages/Home/HomeCarouselDemo.css b/minishop/src/Pages/Home/HomeCarouselDemo.css
deleted file mode 100644
index 24e300d..0000000
--- a/minishop/src/Pages/Home/HomeCarouselDemo.css
+++ /dev/null
@@ -1,153 +0,0 @@
-.header {
- position: fixed;
- top: 0;
- left: 0;
- background-color: black;
- width: 100%;
- display: flex;
- /* justify-content: space-around; */
- justify-content: flex-start;
- align-items: center;
- z-index: 100;
- }
- .page{
- color: red;
- }
- .logo {
- height: auto;
- width: 150px;
- position: relative;
- margin-right: 150px;
- border-radius: 10px;
- /* box-shadow: rgba(16, 16, 16, 0.4) 5px 5px, rgba(14, 14, 14, 0.3) 10px 10px, rgba(5, 5, 5, 0.2) 15px 15px, rgba(2, 2, 2, 0.1) 20px 20px, rgba(0, 0, 0, 0.05) 25px 25px; */
- }
- .navigate {
- display: flex;
- margin-left: 10%;
- box-shadow: rgba(0, 0, 0, 0.56) 0px 22px 70px 4px;
- }
- .navigate li {
- list-style: none;
- margin: 0 10px;
- }
- .navigate p {
- color: #fff;
- text-decoration: none;
- font-weight: 500;
- letter-spacing: 1px;
- }
- .navigate p:hover {
- color: red;
- cursor: pointer;
- }
- .search {
- position: relative;
- width: 550px;
- height: 40px;
- margin-right: 0%;
- margin-left: 10px;
- margin-right: 150px;
- }
- .search input {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- color: #fff;
- background: transparent;
- border: 1px solid rgba(255, 255, 2555, 0.5);
- outline: none;
- border-radius: 4px;
- pad: 0 10px 0 45px;
- }
- .search input::placeholder {
- color: #fff;
- }
- .banner {
- position: relative;
- width: 100%;
- min-height: 100vh;
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 0 100px;
- }
- .bg {
- position: absolute;
- width: 500%;
- height: 100%;
- object-fit: cover;
- }
- .hello{
- width: 100%;
- /* border: 1px solid rgb(38, 0, 255); */
- height: 100px;
- display: grid;
- color: white;
- justify-content: baseline;
- align-items: center;
- gap: 30px;
- background-color: rgb(47, 52, 52);
- }
- .slidP{
- /* border: 1px solid red; */
- padding: 10px;
- }
- .slidP p{
- letter-spacing: 1px;
- cursor: pointer;
- border-radius: 5px;
- padding: 5px;
- color: black;
- text-decoration: none;
- }
- .slidP p:hover{
- color: black;
- font-weight: bold;
- /* box-shadow: rgba(9, 30, 66, 0.25) 0px 1px 1px, rgba(9, 30, 66, 0.13) 0px 0px 1px 1px; */
- }
- .slideIMG{
- height: 20px;
- width: 20px;
- /* border: 1px solid red; */
- justify-content: center;
- align-content: center;
- margin-right: 60px;
- margin-top: 7px;
- margin-left: -50px;
- }
- .cartitem {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin: 0 20px;
- color:black;
- margin-bottom: 20px;
- }
- .cartItemImg {
- border-radius: 50%;
- width: 50px;
- height: 50px;
- object-fit: cover;
- }
- .cartItemDetail {
- display: flex;
- flex: 1;
- color: black;
- padding: 0 20px;
- flex-direction: column;
- }
- .del{
- color:black;
- }
- .del:hover{
- color: red;
- }
- .text {
- display: block;
- width: 100px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
\ No newline at end of file
diff --git a/minishop/src/Pages/Home/HomeCarouselDemo.jsx b/minishop/src/Pages/Home/HomeCarouselDemo.jsx
deleted file mode 100644
index ecc5f95..0000000
--- a/minishop/src/Pages/Home/HomeCarouselDemo.jsx
+++ /dev/null
@@ -1,55 +0,0 @@
-import Carousel from "react-bootstrap/Carousel";
-import { useToast, Button } from "@chakra-ui/react";
-
-import "./HomeCarouselDemo.css"
-
-function HomeCarouselDemo() {
- const toast = useToast();
- return (
- <>
-
-
-
-
- {/* First slide label
- Nulla vitae elit libero, a pharetra augue mollis interdum.
*/}
-
-
-
-
-
- {/* Second slide label
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
*/}
-
-
-
-
-
- {/* Third slide label
-
- Praesent commodo cursus magna, vel scelerisque nisl consectetur.
-
*/}
-
-
-
-
- >
- );
-}
-
-export default HomeCarouselDemo;
\ No newline at end of file
diff --git a/minishop/src/Pages/Home/HomeProducts.jsx b/minishop/src/Pages/Home/HomeProducts.jsx
deleted file mode 100644
index 9261f6d..0000000
--- a/minishop/src/Pages/Home/HomeProducts.jsx
+++ /dev/null
@@ -1,62 +0,0 @@
-import { BsHeart } from "react-icons/bs";
-import { Link } from "react-router-dom";
-
-export default function HomeProducts(data) {
-
- return (
-
- {data.data.map((el, i) => {
- if(i<8){
- return (
-
-
-
-
-
-
-
- {el.name.length < 18 ? el.name : `${el.name.slice(0, 18)}`}
-
-
-
-
-
- {el.name.length < 8 ? el.name : `${el.name.slice(0, 8)}`}
-
-
-
-
-
Price:{el.price}
- Rating:{el.rating}
-
-
-
-
- View
-
-
-
-
-
- )
- }
- })}
-
-
- );
- }
-
-
- // (
- //
- // {el.name.length < 8 ? el.name : `${el.name.slice(0, 8)}`}
- //
- // Price: {el.price}
- // Ratting: {el.rating}
- //
- //
- // View Details
- //
- //
- //
- // )
\ No newline at end of file
diff --git a/minishop/src/Pages/Loading/Loading.jsx b/minishop/src/Pages/Loading/Loading.jsx
deleted file mode 100644
index c01f335..0000000
--- a/minishop/src/Pages/Loading/Loading.jsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import React from 'react'
-const Loading = () => {
- return (
-
-
-
- )
-}
-export default Loading;
\ No newline at end of file
diff --git a/minishop/src/Pages/Order/Order.jsx b/minishop/src/Pages/Order/Order.jsx
deleted file mode 100644
index ca011a8..0000000
--- a/minishop/src/Pages/Order/Order.jsx
+++ /dev/null
@@ -1,88 +0,0 @@
-import { Button, Heading, Spinner, Text } from '@chakra-ui/react';
-import React, { useEffect } from 'react'
-import { AiFillDelete, AiOutlineHome } from 'react-icons/ai';
-import { useDispatch, useSelector } from 'react-redux';
-import { cancelOrder, orderActions } from '../../redux/Order/Order.actions';
-
-import {FcShipped} from "react-icons/fc"
-import { getOrderAPI } from '../../redux/Order/Order.api';
-import { Link } from 'react-router-dom';
-import { TbTruckDelivery } from 'react-icons/tb';
-
-import "./Order.scss"
-import Navbar from '../../components/Navbar/Navbar';
-
-const Order = () => {
-
- const {loading , error, orderData} = useSelector((store) => store.order);
- console.log('orderData:', orderData);
- const dispatch = useDispatch();
- useEffect(() => {
- dispatch(orderActions())
-
- }, [ orderData.length]);
-
- let today = new Date()
- let date = today.getDate() + '-' + parseInt(today.getMonth() + 1) + '-' + today.getFullYear()
- // console.log('date:', date)
-
- return (
- <>
-
-
-
-
-
My Orders:[{orderData.length}]
-
-
-
-
-
-
- {orderData.map((e, id) => (
-
-
-
-
-
-
-
- {e.name.length < 25 ? e.name : `${e.name.slice(0, 25)}...`}{" "}
-
-
Price: ₹{e.price}
-
-
-
-
- {" "}
- {" "}
-
-
Delivery by {date}
-
-
-
-
{
- dispatch(cancelOrder(e.id)).then(()=> dispatch(orderActions()));
- }}
- type="button"
- variant="light"
- marginTop="-7px"
- className="delBTN"
- colorScheme="red"
- color="red"
- >
- {/* */}
- Cancel
-
-
-
-
- ))}
-
-
- >
- );
-}
-
-export default Order
\ No newline at end of file
diff --git a/minishop/src/Pages/Order/Order.scss b/minishop/src/Pages/Order/Order.scss
deleted file mode 100644
index 5e28b73..0000000
--- a/minishop/src/Pages/Order/Order.scss
+++ /dev/null
@@ -1,112 +0,0 @@
-@import "../../Global.scss";
-.CartMainDiv{
- // border: 1px solid red;
- width: 100%;
- height: 100vh;
-}
-.firstDivOrder{
-// border: 1px solid red;
-width: 95%;
-margin: auto;
-overflow-y: scroll;
-height: 100vh;
-background-color: white;
-box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
-border-top-left-radius: 20px;
-@include mobile{
- width: 100%;
- align-items: center;
- }
-}
-.CartDetailsOrder{
- // border: 1px solid red;
- background-color: white;
- box-shadow: rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset;
- text-align: start;
- font-size: 20px;
- // font-weight: bold;
- padding: 0px 20px;
- border-top-left-radius: 20px;
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- font-weight: bold;
- color: gray;
- border: 1px solid rgb(75, 73, 73);
- @include mobile{
- font-size: 18px;
- }
-}
-.cartProDivOrder{
- // border: 1px dotted rgb(139, 138, 138);
- border-bottom:1px dotted grey;
- width: 100%;
- height: 120px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- gap: 30px;
-margin-bottom: 10px;
-padding: 10px;
-@include mobile{
- flex-direction: column;
- height: 200px;
- }
-// box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
-}
-.CartImgDeatilsOrder{
- display: flex;
- width: 100%;
- // border: 1px solid red;
- justify-content: space-between;
- gap: 20px;
- flex-direction: row;
- @include mobile{
- // flex-direction: column;
- width: 100%;
- }
-}
-.CartImgDivOrder{
- height: 100%;
- width: 30%;
-// background-color: white;
-// box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
- // border: 2px solid rgb(15, 77, 148);
-}
-.CartImgDivOrder img{
- height: 100px;
- margin: auto;
- @include mobile{
- height: 90px;
- margin: auto;
- }
-}
-.ProDivDetailOrder{
- // border: 1px solid green;
- width: 70%;
- text-align: start;
- justify-content: start;
-}
-.ProdivnameOrder{
- font-weight: bold;
- font-size: 20px;
- color: rgb(51, 50, 50);
-}
-.ProdivpriceOrder{
- font-size: 18;
- color: rgb(246, 58, 58);
- font-weight: bold;
-}
- .deliveryDivOrder{
- // border: 1px solid red;
- width: 30%;
- display: flex;
- gap: 10px;
- }
- .deliveryDivOrder h5{
- font-size: 25px;
- }
- .deliveryDivOrder p{
- font-size: 15px;
- // font-weight: b;
- }
\ No newline at end of file
diff --git a/minishop/src/Pages/SingleProduct/SinglePage.jsx b/minishop/src/Pages/SingleProduct/SinglePage.jsx
deleted file mode 100644
index 9c54a89..0000000
--- a/minishop/src/Pages/SingleProduct/SinglePage.jsx
+++ /dev/null
@@ -1,196 +0,0 @@
-import { useEffect, useState } from "react";
-import { BsHeart } from "react-icons/bs";
-import { Link, useParams } from "react-router-dom"
-import { useDispatch, useSelector } from "react-redux";
-import { getSingleProduct } from "../../redux/SingleProducts/SingleProduct.actions";
-import axios from "axios";
-import { BsStarFill } from "react-icons/bs";
-import Loading from"../Loading/Loading"
-import { Button, Heading, useToast } from "@chakra-ui/react";
-import "./SinglePage.scss";
-import { BsFillHeartFill } from "react-icons/bs";
-import DemoSimiler from "../../DemoPagesBySachin/DemoSimiler";
-import { cartActions } from "../../redux/Cart/Cart.actions";
-import Navbar from "../../components/Navbar/Navbar";
-import { getUser, updateUser, userCartUpdate } from "../../redux/AddUser/User.actions";
-
-const SinglePage = () => {
- const { id } = useParams();
- const [img, setImg] = useState(1);
- let rat = 4.3;
- let des =
- "A product description is a form of marketing copy used to describe and explain the benefits of your product. In other words, it provides all the information and details of your product on your ecommerce site. These product details can be one sentence, a short paragraph or bulleted. They can be serious, funny or quirky.";
- const {loading , error, itemDetail } = useSelector((store) => store.singleProduct);
- const dispatch = useDispatch();
-const {cartData}=useSelector((store)=>store.cart)
-// const {cartData}=useSelector((store)=>store.cart)
- const [similarData, setSimilarData] = useState([]);
-
- //authentication cart
- const { isauth, userData } = useSelector((val) => val.authUser);
-
- const getSimilarData =async () => {
- try {
- const res = await fetch("https://lackadaisical-volcano-larch.glitch.me/data");
- const data = await res.json();
- setSimilarData(data);
- } catch (error) {
- console.log("e", error);
- }
- }
- useEffect(() => {
- dispatch(getSingleProduct(id))
- getSimilarData();
- dispatch(cartActions())
- }, [dispatch, id, img]);
-
- const toast = useToast();
- const likeFuc = (itemDetail) => {
- toast({
- title: "Added to wishlist",
- description: "We've added this item to wishlist",
- variant: "subtle",
- position:'top-right',
- duration: 3000,
- isClosable: true,
- });
- return axios.post(`https://busy-peplum-fawn.cyclic.app/wishList`, itemDetail);
- };
-
- const addToCart = async(itemDetail) => {
- let currUser = await dispatch(getUser(userData.id))
- currUser.cart.push(itemDetail)
- dispatch(userCartUpdate(currUser)).then(()=>{
- toast({
- title: "Added to Cart",
- description: "We've added this item to Cart",
- variant: "subtle",
- position:'top-right',
- duration: 3000,
- isClosable: true,
- })
- });
- };
-
- if(loading){
-
- };
-
- return (
- <>
-
-
-
-
-
-
-
-
-
- {" "}
-
setImg(0)}
- src={itemDetail?.image?(itemDetail.image?.[0]):("https://media3.giphy.com/media/3oEjI6SIIHBdRxXI40/200w.gif?cid=6c09b9528g3llcf2o3218mjzzpt270ckvllpe9aew6nax25k&rid=200w.gif&ct=g")}
- alt={itemDetail.name}
- />
-
-
- {" "}
-
setImg(1)}
- src={itemDetail?.image?(itemDetail.image?.[1]):("https://media3.giphy.com/media/3oEjI6SIIHBdRxXI40/200w.gif?cid=6c09b9528g3llcf2o3218mjzzpt270ckvllpe9aew6nax25k&rid=200w.gif&ct=g")}
- alt={itemDetail.name}
- />
-
-
- {" "}
-
setImg(2)}
- src={itemDetail?.image?(itemDetail.image?.[2]):("https://media3.giphy.com/media/3oEjI6SIIHBdRxXI40/200w.gif?cid=6c09b9528g3llcf2o3218mjzzpt270ckvllpe9aew6nax25k&rid=200w.gif&ct=g")}
- alt={itemDetail.name}
- />
-
-
- {" "}
-
setImg(3)}
- src={itemDetail?.image?(itemDetail.image?.[3]):("https://media3.giphy.com/media/3oEjI6SIIHBdRxXI40/200w.gif?cid=6c09b9528g3llcf2o3218mjzzpt270ckvllpe9aew6nax25k&rid=200w.gif&ct=g")}
- alt={itemDetail.name}
- />
-
-
-
-
-
{itemDetail?.Categories}
-
{itemDetail?.name}
-
- {" "}
- Price: ₹{itemDetail?.price} ₹{itemDetail?.og_price}
-
-
Offer: {itemDetail?.saving}
-
- {" "}
-
- {itemDetail?.rating ? itemDetail?.rating : rat}
-
-
-
-
-
-
- {itemDetail?.discription ? itemDetail?.discription :
- <>
-
- {des}
-
- >
- }
-
-
-
likeFuc(itemDetail)}>
-
-
- {itemDetail.show?(
-
- {
- cartData.some((p) => p.id === itemDetail.id) ? (
- Already In Cart
- ) : (
- addToCart(itemDetail)
- }>Add To Cart
- )}
-
- ) :(
Out Of stock )}
-
-
-
-
-
-
-
-
similar products
-
- item.Categories === itemDetail.Categories)}/>
-
-
- {/* banner */}
-
-
-
-
- {/* recmended product footer*/}
-
-
- India's fastest growing audio & wearables brand. The most incredible
- range of wireless earphones, earbuds, headphones, smart watches, and
- home audio. From workouts to adventures, boAt will get you sailing!
-
-
-
- >
- );
-};
-
-export default SinglePage;
\ No newline at end of file
diff --git a/minishop/src/Pages/SingleProduct/SinglePage.scss b/minishop/src/Pages/SingleProduct/SinglePage.scss
deleted file mode 100644
index b06bd98..0000000
--- a/minishop/src/Pages/SingleProduct/SinglePage.scss
+++ /dev/null
@@ -1,264 +0,0 @@
-@import "../../Global.scss";
-.maindiv{
- width: 100%;
- height: auto;
- // border: 1px solid red;
- display: flex;
- gap: 30px;
- padding: 2%;
- @include mobile{
- flex-direction: column;
- align-items: center;
- }
-}
-.imgDiv{
- width: 40%;
- height: 90%;
- margin: auto;
- // border: 2px solid rgb(49, 0, 128);
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- @include mobile{
- width: 100%;
- flex-direction: column;
- align-items: center;
- }
-}
- .imagess{
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- width:80% ;
- margin: auto;
- height: 20%;
- justify-content: center;
- /* border: 2px solid rgb(128, 255, 0); */
- border-radius: 5px;
- /* margin: auto; */
- /* background-color: rgb(255, 255, 255); */
- gap: 5px;
- align-content: center;
- /* box-shadow: rgba(255, 254, 254, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px; */
- padding: 5px;
- margin-top: 40px;
- @include mobile{
- width: 100%;
- }
- }
- .curimg{
- /* border: 2px solid rgb(238, 13, 13); */
- width: 80%;
- height: 400px;
- // object-fit: cover;
- overflow: hidden;
- border-radius: 10px;
- margin-top: -0px;
- display: flex;
- background-color: white;
- padding: 10px 10px 10px 10px;
- justify-content: center;
- align-items: center;
-// border: 2px solid rgb(255, 0, 8);
- text-align: center;
- margin: auto;
- /* background-color: rgb(255, 255, 255); */
- @include mobile{
- width: 95%;
- height: 380px;
- flex-direction: column;
- align-items: center;
- }
- }
- .curimg img{
- justify-content: center;
-// align-content: center;
- align-items: center;
-// height: 100%;
-// border: 1px solid red;
- width: 100%;
- border-top-left-radius: 50px;
-// box-shadow: rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px, rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px, rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px; }
- }
- .imagess div{
- /* border: 1px solid red; */
- width: 100%;
- justify-content: center;
- height: 90%;
- margin: auto;
- }
- .imagess div img{
- width: 100%;
- height: 100px;
- cursor: pointer;
- border-top-left-radius: 10px;
- /* box-shadow: rgba(0, 0, 0, 0.2) 0px 18px 50px -10px; */
- /* box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset; */
- /* box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset; */
- margin: auto;
- }
- .name{
- font-weight: bolder;
-font-size: 20px;
-color: rgb(247, 55, 55);
- }
- .detailsdiv{
- width: 60%;
- height: 80%;
- margin: auto;
- /* border: 1px solid green; */
- display: flex;
- flex-direction: column;
- text-align: start;
- padding: 1%;
- @include mobile{
- width: 95%;
- flex-direction: column;
- align-items: start;
- }
-}
-.catog{
- font-weight: bold;
- font-size: 30px;
- text-transform: uppercase;
-}
-.rating{
- font-size: 16px;
- font-weight: bold;
-}
-.discription{
- font-size: 17px;
- letter-spacing: 1px;
- margin-top: 14px;
-}
-.btnWC{
- display: flex;
- width: 40%;
-// border: 1px solid red;
- margin-top: 40px;
- justify-content: space-between;
- align-items: start;
- @include mobile{
- width: 100%;
- margin-top: 20px;
- align-items: center;
- // margin: auto;
- // border: 1px solid red;
- }
-}
-.wish{
- border: 1px solid rgb(164, 163, 163);
- padding: 5px 10px;
- /* background-color: rgb(126, 125, 125); */
- border-radius: 5px;
- padding:5px 15px;
-}
-.wish div{
- display: flex;
- flex-direction: row;
- gap: 10px;
- justify-content: space-around;
- align-content: center;
- align-items: center;
- font-weight: bold;
-}
-.wish div span{
- color: white;
-}
-.wish div span:hover{
- color: red;
-}
-.wish {
- background-color: rgb(247, 48, 48);
- color: white;
- text-align: center;
- letter-spacing: 1px;
-}
-.cart{
- /* border: 1px solid red; */
- padding: 5px 15px;
- border-radius: 5px;
- background-color: rgb(22, 88, 108);
- border: 1px solid black;
- color: white;
- font-weight: bold;
-}
-.cart:hover{
- background-color: rgb(1,75,97);
-}
-.wish:hover{
- color: black;
- background-color: rgb(234, 234, 231);
-}
- .price{
- font-size: 20px;
- font-weight: bold;
-}
-.price span{
- text-decoration: line-through;
- color: rgb(119, 113, 113);
-}
-.offer{
- color: green;
-}
-.ratingDiv{
- display: flex;
- justify-content: space-around;
- width: 50px;
- align-content: center;
- color: green;
-}
-.ratingDiv span{
- margin-top: 4px;
- font-size: 15px;
-}
-.recFooter p{
- color: rgb(134, 132, 132);
- background-color: black;
- padding: 10px 20px;
- // margin-top: 20px;
- margin-bottom: -60px;
- text-align: center;
- @include mobile{
- font-size: 15px;
- padding: 10px 10px 10px 10px;
- text-align: center;
- }
-}
-.bannner{
- width: 100%;
- margin: auto;
- // margin-top: -10px;
- // background-color: white;
-}
-.bannner img{
- width: 100%;
- // height: 180px;
- cursor: pointer;
- box-shadow: rgba(0, 0, 0, 0.25) 0px 14px 20px, rgba(0, 0, 0, 0.22) 0px 10px 10px;}
- .similar{
- color: rgb(33, 32, 32);
- // margin-top: 10px;
- // border: 1px solid red;
- text-align: start;
- padding: 10px 80px;
- text-transform: uppercase;
- text-decoration: underline;
- @include mobile{
- font-size: 20px;
- padding: 10px 20px;
- text-decoration: none;
- text-align: center;
- }
- }
- .bannner2{
- width: 100%;
- margin: auto;
- }
- .bannner2 img{
- width: 100%;
- // height: 180px;
- cursor: pointer;
- margin-top: 20px;
- box-shadow: rgba(0, 0, 0, 0.25)58px 14px 28px, rgba(10, 0, 0, 0.22) 10px 10px 10px;
-}
\ No newline at end of file
diff --git a/minishop/src/Pages/Wishlist/Wishlist.jsx b/minishop/src/Pages/Wishlist/Wishlist.jsx
deleted file mode 100644
index c5cf2f0..0000000
--- a/minishop/src/Pages/Wishlist/Wishlist.jsx
+++ /dev/null
@@ -1,126 +0,0 @@
-import { Button, useToast } from '@chakra-ui/react';
-import axios from 'axios';
-import React, { useEffect } from 'react'
-import { AiFillDelete, AiOutlineHome } from 'react-icons/ai';
-// import { BsStarFill } from 'react-icons/bs';
-import { useDispatch, useSelector } from 'react-redux';
-import { Link, useNavigate } from 'react-router-dom';
-import Navbar from '../../components/Navbar/Navbar';
-import { removeWishlistData, wishlistGetData } from '../../redux/Wishlist/Wishlist.actions';
-
-import "./Wishlist.scss"
-
-const Wishlist = () => {
-
- const {loading , error, wishData} = useSelector((store) => store.wishlist);
- const toast = useToast();
- const navigate = useNavigate();
-
-
- console.log('cartData:', wishData)
- const dispatch = useDispatch();
- useEffect(() => {
- dispatch(wishlistGetData())
-
- }, [ wishData.length]);
-
- const addToCart = (itemDetail) => {
- toast({
- // colorScheme:'yellow',
- title: "Added to Cart",
- description: "We've added this item to Cart",
- variant: "subtle",
- duration: 3000,
- isClosable: true,
- });
- return axios.post(`https://lackadaisical-volcano-larch.glitch.me/cart`,{...itemDetail,qty:1});
- };
-
- const removeWishFun = (id) => {
- dispatch(removeWishlistData(id)).then(()=> dispatch(wishlistGetData()));
- }
-
- return (
- <>
-
-
-
-
-
My WishList:({wishData.length})
-
-
-
-
-
-
- {wishData.map((e, id) => (
-
-
-
-
-
-
- {e.show ? (
-
In Stock
- ) : (
-
Out Of Stock
- )}
-
- {e.name.length < 25 ? e.name : `${e.name.slice(0, 25)}...`}{" "}
-
-
-
Price: ₹{e.price}
-
- {e.og_price}
-
-
- 17% off
-
-
-
- Rating: {e.raitng ? e.raitng : "4.3"}
-
-
-
-
-
- {e.show ? (
- addToCart(e)}>Add To Cart
- ) : (
- navigate('/')}>Explore Similar
- )}
-
-
-
{
- // dispatch(removeWishlistData(e.id)).then(() =>
- // dispatch(wishlistGetData())
- // );
- removeWishFun(e.id)
- }}
- type="button"
- variant="light"
- marginTop="-7px"
- className="delBTNWish"
- >
-
-
-
-
-
- ))}
-
-
- >
- )
-}
-
-export default Wishlist
\ No newline at end of file
diff --git a/minishop/src/Pages/Wishlist/Wishlist.scss b/minishop/src/Pages/Wishlist/Wishlist.scss
deleted file mode 100644
index f2e2a0e..0000000
--- a/minishop/src/Pages/Wishlist/Wishlist.scss
+++ /dev/null
@@ -1,166 +0,0 @@
-@import "../../Global.scss";
-.CartMainDiv{
- // border: 1px solid red;
- width: 100%;
- height: 150vh;
- padding: 100px;
- @include mobile{
- padding:5px;
- }
-}
-.firstDivWish{
-// border: 1px solid red;
- border-radius: 10px;
-width: 60%;
-overflow-y: scroll;
-height: 80vh;
-background-color: white;
-box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
-margin: auto;
-@include mobile{
- width: 100%;
- align-items: center;
- }
-}
-.CartDetailsWish{
- // border: 1px solid red;
- background-color: white;
- text-align: start;
- font-size: 20px;
- // font-weight: bold;
- padding: 0px 20px;
- box-shadow: rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- font-weight: bold;
- color: gray;
- // border: 1px solid rgb(75, 73, 73);
- @include mobile{
- font-size: 18px;
- }
-}
-.cartProDivWish{
- // border: 1px dotted rgb(139, 138, 138);
- border-bottom:1px dotted grey;
- width: 100%;
- height: 120px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- gap: 30px;
-margin-bottom: 10px;
-padding: 10px;
-@include mobile{
- flex-direction: column;
- height: 200px;
- }
-// box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
-}
-.CartImgDeatilsWish{
- display: flex;
- width: 60%;
- // border: 1px solid red;
- justify-content: space-between;
- gap: 20px;
- flex-direction: row;
- @include mobile{
- // flex-direction: column;
- width: 100%;
- }
-}
-.CartImgDivWish{
- height: 100%;
- width: 30%;
-// background-color: white;
-// box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
- // border: 2px solid rgb(15, 77, 148);
-}
-.CartImgDivWish img{
- height: 100px;
- margin: auto;
- @include mobile{
- height: 90px;
- margin: auto;
- }
-}
-.ProDivDetailWish{
- // border: 1px solid green;
- width: 70%;
- text-align: start;
- justify-content: start;
-}
-.ProdivnameWish{
- font-weight: bold;
- font-size: 15px;
- color: rgb(220,53,69)
-}
-.ProdivpriceWish{
- display: flex;
- flex-direction: row;
-// border: 1px solid red;
- gap: 8px;
-}
-.ProdivpriceWish h4{
- font-weight: bold;
- font-size: 15px;
-}
-.StockWish{
- color: green;
- font-size: 15px;
- font-weight: bold;
-}
-.OutStockWish{
- color:red;
- font-weight: bold;
-}
-.ProdivratingWish{
- color: gray ;
-font-size: 14px;
-}
-.QRdivDiv{
-width: 35%;
-// border: 1px solid green;
-margin: auto;
-display: flex;
-justify-content: space-around;
-@include mobile{
- width:100%;
- // border: 1px solid green;
- justify-content: space-evenly;
- }
-}
-.QdivWish{
- // border: 1px solid red;
- display: flex;
-// width: 40%;
-gap: 5px;
-justify-content: space-around;
-@include mobile{
- margin: auto;
- }
-}
- .QdivWish Button{
- border: 1px solid gray;
- letter-spacing: -0.2px;
- border-radius: 4px;
- height: 30px;
- color: rgb(220,53,69);
-// background-color: rgb(220,53,69);
- font-size: 20px;
- @include mobile{
- }
- }
- .QdivWish Button:hover{
- background-color: rgb(222, 220, 220);
- }
- .delBTNWish:hover{
- background-color: rgb(245, 243, 243);
- color: red;
- }
- .delBTNWish{
- color: gray;
- }
- .Explor{
- color: rgb(108, 108, 226);
- }
\ No newline at end of file
diff --git a/minishop/src/Pages/checkout/Address.jsx b/minishop/src/Pages/checkout/Address.jsx
deleted file mode 100644
index 39505a4..0000000
--- a/minishop/src/Pages/checkout/Address.jsx
+++ /dev/null
@@ -1,112 +0,0 @@
-import { Heading } from "@chakra-ui/layout";
-import React, { useState } from "react";
-import { Link, Navigate } from "react-router-dom";
-import "./Payment.css";
-
-const initAdress = {
- house: "",
- colony: "",
- city: "",
- state: "",
- country: "",
- pincode: "",
- landmark: "",
- phone: "",
-};
-
-const Address = () => {
- const [address, setAddress] = useState(initAdress);
-
- const handleChange = (e) => {
- setAddress({ ...address, [e.target.placeholder]: e.target.value });
- };
-
- const handleSubmit = (e) => {
- e.preventDefault();
- ;
- };
-
- console.log(address);
- return (
-
- );
-};
-
-export default Address;
diff --git a/minishop/src/Pages/checkout/Payment.css b/minishop/src/Pages/checkout/Payment.css
deleted file mode 100644
index ba76e1a..0000000
--- a/minishop/src/Pages/checkout/Payment.css
+++ /dev/null
@@ -1,183 +0,0 @@
-@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap");
-
-* {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- font-family: "Roboto", Arial, Helvetica, sans-serif;
-}
-
-/* body {
- min-height: 100vh;
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 2rem;
- background: #eee;
- background-size: cover;
- background-position: center;
- background-repeat: no-repeat;
-} */
-
-.container {
- margin-top: 300px;
- /* max-width: 1200px; */
- margin: auto;
- /* min-height: 100vh; */
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 2rem;
- /* background: #eee; */
- background-size: cover;
- background-position: center;
- background-repeat: no-repeat;
-}
-
-#form {
- background: #fff;
- max-width: 500px;
- max-height: 100%;
- display: flex;
- justify-content: center;
- flex-direction: column;
- padding: 1rem;
- border-radius: 10px;
- box-shadow: 3px 3px 40px #545454e8;
- position: relative;
-}
-
-#form input,
-#form select {
- margin: 1rem 0;
- padding: 0.75rem 0.25rem;
- outline: none;
- border: 1px solid #ccc;
- border-radius: 5px;
- position: relative;
- width: 100%;
-}
-
-#form h4 {
- color: #555;
- font-size: 0.9rem;
-}
-
-.mt {
- margin-top: 8rem;
-}
-
-#form .input-container {
- position: relative;
- font-size: 1rem;
- color: #333;
-}
-
-#form .input-grp {
- display: grid;
- grid-template-columns: 1fr 1fr 1fr;
- grid-gap: 0.5rem;
-}
-
-#form button {
- width: 100%;
- padding: 1rem 0.5rem;
- margin-top: 1.5rem;
- outline: none;
- border: none;
- border-radius: 7px;
- background-color: #060a24;
- color: #fff;
- letter-spacing: 1px;
- font-size: 1.25rem;
- cursor: pointer;
- position: relative;
- z-index: 9;
-}
-
-#form button:before {
- content: "";
- position: absolute;
- top: 0;
- left: 0;
- height: 100%;
- width: 0;
- background-color: #3b2dd2fa;
- z-index: -1;
-}
-
-#form button:hover:before {
- width: 100%;
- transition: 0.2s all;
-}
-
-#card {
- height: 200px;
- width: 100%;
- max-width: 385px;
- position: absolute;
- top: -100px;
- left: 50%;
- transform: translateX(-50%);
- border-radius: 15px;
- padding: 1rem;
- display: flex;
- flex-direction: column;
- justify-content: center;
- background-image: url("https://images.pexels.com/photos/924824/pexels-photo-924824.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260");
- background-size: cover;
- background-position: center;
- color: #eee;
- filter: drop-shadow(1px 3px 10px #222);
-
- animation: fadeIn 0.2s linear 1;
-}
-
-@keyframes fadeIn {
- from {
- top: -150px;
- opacity: 0;
- }
-
- to {
- opacity: 1;
- }
-}
-
-#card .header {
- display: flex;
- justify-content: space-between;
- height: 0px;
-}
-
-#card .sticker {
- width: 50px;
- height: 40px;
- background-image: url("https://images.pexels.com/photos/728471/pexels-photo-728471.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500");
- background-position: center;
- background-size: cover;
- object-fit: contain;
- border-radius: 5px;
-}
-
-#card .logo {
- margin-top: 8rem;
- margin-left: 18rem;
- max-width: 60px;
-}
-
-#card .body {
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- height: 60%;
-}
-
-#card .footer {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- height: 75px;
-}
\ No newline at end of file
diff --git a/minishop/src/Pages/checkout/Payment.jsx b/minishop/src/Pages/checkout/Payment.jsx
deleted file mode 100644
index b821c80..0000000
--- a/minishop/src/Pages/checkout/Payment.jsx
+++ /dev/null
@@ -1,254 +0,0 @@
-
-import {
-
- Button,
-
- Modal,
- ModalBody,
- ModalCloseButton,
- ModalContent,
- ModalFooter,
- ModalHeader,
- ModalOverlay,
-
- useDisclosure,
-
-} from "@chakra-ui/react";
-import { Box, Heading, Spacer, Text, useToast } from "@chakra-ui/react";
-// import Cleave from "cleave.js";
-import React, { useState } from "react";
-import { useSelector } from "react-redux";
-import { useNavigate } from "react-router-dom";
-import "./Payment.css";
-
-const initDetails = {
- creditCardNum: "",
- cardHolder: "",
- expireMonth: "January",
- expireYear: "2024",
-};
-
-const Payment = () => {
- const totalAmount = useSelector((store) => store.cart.totalPrice);
- const [details, setDetails] = useState(initDetails);
- const toast = useToast();
- const navigate = useNavigate();
- const { isOpen, onOpen, onClose } = useDisclosure();
- const handleChange = (e) => {
- setDetails({ ...details, [e.target.name]: e.target.value });
- console.log(e.target.value);
- };
-
- const handleSubmit = (e) => {
- e.preventDefault();
- // toast({
- // title: "Order Placed",
- // description: "Your Order Will Be Delivered in 5-6 Days",
- // status: "success",
- // duration: 6000,
- // isClosable: true,
- // });
- // navigate("/");
- onOpen();
- };
-
- return (
-
-
Enter you Credit Card details
-
Total Amount will be deduct ₹ {totalAmount}
-
-
-
-
-
-
-
- Payment Successful
-
-
-
-
-
-
-
-
- navigate("/order")} variant="solid">See Orders
-
-
-
-
-
- );
-};
-
-export default Payment;
diff --git a/minishop/src/Pages/login&signup/AuthContextProvider.jsx b/minishop/src/Pages/login&signup/AuthContextProvider.jsx
deleted file mode 100644
index 6a58ba9..0000000
--- a/minishop/src/Pages/login&signup/AuthContextProvider.jsx
+++ /dev/null
@@ -1,69 +0,0 @@
-import React, { useEffect, useState } from "react";
-import { createContext } from "react";
-import {
- signOut,
- sendPasswordResetEmail,
- createUserWithEmailAndPassword,
- signInWithEmailAndPassword,
- onAuthStateChanged,
- signInWithPopup,
-} from "firebase/auth";
-import { auth, provider } from "../../config";
-
-export const AuthContext = createContext();
-
-const AuthContextProvider = ({ children }) => {
- const [user, setUser] = useState({});
- const [isAuth, setIsAuth] = useState(true);
-
- const createUser = (email, password) => {
- return createUserWithEmailAndPassword(auth, email, password);
- };
-
- const loginUser = (email, password) => {
- setIsAuth(true);
- return signInWithEmailAndPassword(auth, email, password);
- };
-
- const logout = () => {
- setIsAuth(false);
- return signOut(auth);
- };
-
- const forgotPassword = (email) => {
- return sendPasswordResetEmail(auth, email);
- };
-
- const continueWithGoogle = async () => {
- try {
- await signInWithPopup(auth, provider);
- setIsAuth(true);
- } catch (error) {
- // console.log(error.message);
- }
- };
-
- useEffect(() => {
- const unsubscribe = onAuthStateChanged(auth, (currentUser) => {
- // console.log(currentUser);
- setUser(currentUser);
- });
- return () => {
- unsubscribe();
- };
- }, []);
-
- const value = {
- isAuth,
- createUser,
- logout,
- user,
- loginUser,
- forgotPassword,
- continueWithGoogle,
- };
-
- return {children} ;
-};
-
-export default AuthContextProvider;
diff --git a/minishop/src/Pages/login&signup/Login.jsx b/minishop/src/Pages/login&signup/Login.jsx
deleted file mode 100644
index 6f9b5b7..0000000
--- a/minishop/src/Pages/login&signup/Login.jsx
+++ /dev/null
@@ -1,162 +0,0 @@
-
-// import { Button } from "@chakra-ui/button";
-// import { FormControl } from "@chakra-ui/form-control";
-// import { useDisclosure } from "@chakra-ui/hooks";
-// import { Input } from "@chakra-ui/input";
-// import { Flex, Heading, Stack, Text } from "@chakra-ui/layout";
-// import {
-// Modal,
-// ModalBody,
-// ModalCloseButton,
-// ModalContent,
-// ModalOverlay,
-// } from "@chakra-ui/modal";
-// import { useContext, useRef, useState } from "react";
-// import { Link } from "react-router-dom";
-// import { AuthContext } from "./AuthContextProvider";
-// import { GoogleButton } from "react-google-button";
-
-import { Button } from "@chakra-ui/button";
-import { FormControl } from "@chakra-ui/form-control";
-import { useDisclosure } from "@chakra-ui/hooks";
-import { Input } from "@chakra-ui/input";
-
-import { Flex, Heading, Stack, Text } from "@chakra-ui/layout";
-import {
- Modal,
- ModalBody,
- ModalCloseButton,
- ModalContent,
- ModalOverlay,
-} from "@chakra-ui/modal";
-import { useContext, useRef, useState } from "react";
-import { Link } from "react-router-dom";
-import { AuthContext } from "./AuthContextProvider";
-import { GoogleButton } from "react-google-button";
-
-
-// const userInit = {
-// email: "",
-// password: "",
-// };
-
-// const Login = () => {
-// const [user, setUser] = useState(userInit);
-// const [error, setError] = useState("");
-// const emailRef = useRef(null);
-
-// const { loginUser, forgotPassword, continueWithGoogle } =
-// useContext(AuthContext);
-
-// const { isOpen, onOpen, onClose } = useDisclosure();
-
-// const handleChange = (e) => {
-// setUser({ ...user, [e.target.type]: e.target.value });
-// };
-
-// const handleSubmit = async (e) => {
-// e.preventDefault();
-// try {
-// await loginUser(user.email, user.password);
-// console.log("Logged In");
-// } catch (e) {
-// setError(e.message);
-// console.log(e.message);
-// }
-// };
-
-// const forgotPasswordHandler = async () => {
-// const email = emailRef.current.value;
-// if (email)
-// try {
-// await forgotPassword(email);
-// console.log("RESET mail sent");
-// } catch (e) {
-// setError(e.message);
-// console.log(e.message);
-// }
-// };
-
-// return (
-//
-//
-//
Login
-//
-//
-//
-//
-// Forgot password?
-//
-//
-//
-//
-//
-//
-//
-//
-//
-// Reset password
-//
-//
-// You'll get an email with a reset link
-//
-//
-//
-//
-//
-//
-// Request Reset
-//
-//
-//
-//
-//
-//
-//
-//
-// );
-// };
-
-// export default Login;
diff --git a/minishop/src/Pages/login&signup/PrivateRoute.jsx b/minishop/src/Pages/login&signup/PrivateRoute.jsx
deleted file mode 100644
index 8e63567..0000000
--- a/minishop/src/Pages/login&signup/PrivateRoute.jsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import React, { useContext } from "react";
-import { useNavigate } from "react-router-dom";
-import { useToast } from "@chakra-ui/react";
-import { useSelector } from "react-redux";
-import DLogin from "../../DemoPagesBySachin/DLogin";
-
-const PrivateRoute = ({ children }) => {
- const isauth = useSelector((val) => val.authUser.isauth);
- const toast = useToast();
- const nav = useNavigate()
- if (isauth) {
- return children;
- }else{
- toast({
- title: "Login required",
- status: "error",
- position:'top-right',
- description: "Please login first.",
- isClosable: true,
- });
- nav('/DLogin')
- return
- }
-};
-
-export default PrivateRoute;
diff --git a/minishop/src/Pages/login&signup/Signup.jsx b/minishop/src/Pages/login&signup/Signup.jsx
deleted file mode 100644
index 0ece601..0000000
--- a/minishop/src/Pages/login&signup/Signup.jsx
+++ /dev/null
@@ -1,55 +0,0 @@
-// import React, { useContext, useState } from "react";
-// import { AuthContext } from "./AuthContextProvider";
-
-// const userInit = {
-// email: "",
-// password: "",
-// };
-
-// const Signup = () => {
-// const [user, setUser] = useState(userInit);
-// const [error, setError] = useState("");
-// const { createUser } = useContext(AuthContext);
-
-// const handleChange = (e) => {
-// setUser({ ...user, [e.target.type]: e.target.value });
-// };
-
-// const handleSubmit = async (e) => {
-// e.preventDefault();
-// try {
-// await createUser(user.email, user.password);
-// } catch (e) {
-// setError(e.message);
-// console.log(e.message);
-// }
-// };
-
-// return (
-//
-//
-//
Signup
-//
-//
-//
-// );
-// };
-
-// export default Signup;
diff --git a/minishop/src/Pages/products/AccordionwithButton.jsx b/minishop/src/Pages/products/AccordionwithButton.jsx
deleted file mode 100644
index 18eaf20..0000000
--- a/minishop/src/Pages/products/AccordionwithButton.jsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import {
- Accordion,
- AccordionButton,
- AccordionIcon,
- AccordionItem,
- AccordionPanel,
- Box,
- Button,
- Checkbox,
- Flex,
- Input,
- Stack,
- Text,
-} from "@chakra-ui/react";
-import React from "react";
-
-const AccordionwithButton = ({
- setOrder,
- setPrice,
- values,
- title,
- bt1,
- bt2,
-}) => {
- return (
-
-
-
-
- {title}
-
-
-
-
-
-
- {
- setPrice(values);
- setOrder("asc");
- }}
- >
- {bt1}
-
- {
- setPrice(values);
- console.log(values);
- setOrder("desc");
- }}
- >
- {bt2}
-
-
-
-
- );
-};
-
-export default AccordionwithButton;
diff --git a/minishop/src/Pages/products/LeftSideFilter.jsx b/minishop/src/Pages/products/LeftSideFilter.jsx
deleted file mode 100644
index 12bd03a..0000000
--- a/minishop/src/Pages/products/LeftSideFilter.jsx
+++ /dev/null
@@ -1,93 +0,0 @@
-import {
- Accordion,
- AccordionButton,
- AccordionIcon,
- AccordionItem,
- AccordionPanel,
- Box,
- Button,
- Stack,
- Text,
- useToast,
-} from "@chakra-ui/react";
-import { useState } from "react";
-import AccordionwithButton from "./AccordionwithButton";
-import { FilterSection, PriceFilter } from "./LeftSideFilterComponents";
-
-export const LeftSideFilter = ({ setPrice, setOrder }) => {
- const init = {
- Gender: { Men: false, Women: false, Kids: false },
- Category: { Cloths: false, Shoes: false },
- Size: { Small: false, Medium: false, Large: false },
- Colour: {
- Black: false,
- White: false,
- Green: false,
- Red: false,
- Mix: false,
- },
- };
-
- const [priceRange, setPriceRange] = useState({
- minPrice: 0,
- maxPrice: Infinity,
- });
- const [manageFilter, setManageFilter] = useState(init);
-
- const toast = useToast();
-
- const handleFilterChange = ({ target: { name, value, checked } }) => {
- setManageFilter({
- ...manageFilter,
- [name]: {
- ...manageFilter[name],
- [value]: checked,
- },
- });
- };
-
- const handleFilterApply = (e) => {
- // (toast, "Filter Applied Successfully", "success", 1000);
- };
-
- const handleChange = ({ target: { value, name } }) => {
- setPriceRange({ ...priceRange, [name]: value });
- };
-
- const handleSubmit = () => {
- // (toast, "Price Range Applied Successfully", "success", 1000);
- };
-
- return (
-
-
-
- {
-
- }
-
-
-
- );
-};
diff --git a/minishop/src/Pages/products/LeftSideFilterComponents.jsx b/minishop/src/Pages/products/LeftSideFilterComponents.jsx
deleted file mode 100644
index b40d3b5..0000000
--- a/minishop/src/Pages/products/LeftSideFilterComponents.jsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Box, Button, Checkbox, Flex, Input, Stack, Text } from "@chakra-ui/react";
-
-
-export const FilterSection = ({ title, item, change, apply }) => {
-
- return (
-
-
-
- {title}
-
-
-
-
-
-
-
- {item.map((e, i) => (
- { change(e) }} value={e} name={title} key={i}>
- {e}
-
- ))}
- Apply
-
-
-
-
- );
-};
-
-export const Filter2Section = ({ title, item, change, apply }) => {
-
- return (
-
-
-
- {title}
-
-
-
-
-
-
-
- {item.map((e, i) => (
- { change(e) }} value={e} name={title} key={i}>
- {e}
-
- ))}
- Apply
-
-
-
-
- );
-};
diff --git a/minishop/src/Pages/products/Products.jsx b/minishop/src/Pages/products/Products.jsx
deleted file mode 100644
index 6604e41..0000000
--- a/minishop/src/Pages/products/Products.jsx
+++ /dev/null
@@ -1,100 +0,0 @@
-import { useEffect, useState } from "react";
-import { useNavigate, useParams } from "react-router-dom";
-import "./Products.scss";
-import React from "react";
-import { BsStarFill } from "react-icons/bs";
-import Navbar from "../../components/Navbar/Navbar";
-import { LeftSideFilter } from "./LeftSideFilter";
-import { SortFilters } from "./SortFilters";
-import { Button } from "@chakra-ui/react";
-
-const Products = () => {
- const { Categories } = useParams();
- const [value, setValue] = useState([]);
- const [sort, setSort] = useState(Categories);
- const navigate = useNavigate();
- const [price, setPrice] = useState("");
- const [order, setOrder] = useState("");
-
- const getSimilarData = async () => {
- try {
- const res = await fetch(
- `https://lackadaisical-volcano-larch.glitch.me/data/?q=${sort}&_sort=${price}&_order=${order}`
- );
- const datas = await res.json();
- console.log(datas);
- setValue(datas);
- } catch (error) {
- console.log("e", error);
- }
- };
- console.log("line22", Categories);
- useEffect(() => {
- getSimilarData();
- }, [Categories, sort, price, order]);
-
- return (
-
-
-
Products - {value.length}
-
-
-
- {
- setPrice("");
- setOrder("");
- }}
- style={{ marginRight: "1rem", marginBottom: "1rem",border:"1px solid gray" }}
- >
- Reset filters
-
-
-
-
-
-
-
-
-
-
-
- {value?.map((el, index) => (
-
-
-
- {el.brand.length < 8 ? el.brand : `${el.brand.slice(0, 8)}`}
-
-
-
- Price: ₹ {el.price}
-
-
-
- {" "}
-
-
-
{el.rating}
-
-
-
navigate(`/data/${el.id}`)}
- >
- View Details
-
-
- ))}
-
-
-
- );
-};
-
-export default Products;
diff --git a/minishop/src/Pages/products/Products.scss b/minishop/src/Pages/products/Products.scss
deleted file mode 100644
index 36a77bb..0000000
--- a/minishop/src/Pages/products/Products.scss
+++ /dev/null
@@ -1,98 +0,0 @@
-
-.heading{
- margin-top: 90px;
- font-size: 30px;
- text-align: start;
- padding-left: 30px;
- font-weight: bolder;
-}
-.proMainDiv{
- width: 90%;
- margin: auto;
- margin-top: 12px;
- display: flex;
- flex-wrap: wrap;
-}
-.main_container{
- display: flex;
-}
-.main_container>:first-child{
- width:350px;
- background-color: white;
- margin-top: 3rem;
- margin-left: 2rem;
- height: 400px;
- position: sticky;
-}
-.prodiv{
- width: 250px;
- margin: auto;
- height: 350px;
- background-color: white;
- padding: 10px;
- box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
- border-radius: 10px;
- margin-top: 30px;
-}
-.proName{
- font-weight: bolder;
- letter-spacing: 1px;
- font-size: 20px;
-}
-
-.prodiv img{
- width: 100%;
- height: 70%;
- margin: auto;
-}
- .proPrice {
-
- font-size: 18px;
-}
-.proPrice span {
- font-weight: bold;
- font-size: 20px;
- color: rgb(248, 57, 57);
-}
-.addtocart{
- border: 1px solid teal;
- // background-color: rgb(67, 67, 67);
- padding: 5px 15px;
- // color: rgb(255, 251, 251);
- border-radius: 5px;
- margin: auto;
- font-weight: bold;
- box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
- margin-top: 5px;
-}
-.addtocart:hover{
- border: none;
-// color:white;
-background: rgb(103,101,102);
-background: radial-gradient(circle, rgba(103,101,102,1) 0%, rgba(123,147,175,1) 75%);
-}
-.divPriceRating{
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- width: 90%;
- margin: auto;
-}
-.divStar{
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- // border: 1px solid red;
- gap: 5px;
- margin-top: 3px;
- text-align: center;
- align-content: center;
-}
-
-.divStar p{
- margin-top: 2px;
- color: green;
-}
-.divStar span{
- color:rgb(9, 10, 9) ;
-}
\ No newline at end of file
diff --git a/minishop/src/Pages/products/SortFilters.jsx b/minishop/src/Pages/products/SortFilters.jsx
deleted file mode 100644
index 6ba1f69..0000000
--- a/minishop/src/Pages/products/SortFilters.jsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import {
- Box,
- Button,
- Menu,
- MenuButton,
- MenuItem,
- MenuList,
- useToast,
-} from "@chakra-ui/react";
-import { AiOutlineDown } from "react-icons/ai";
-
-export const SortFilters = ({ setPrice, setOrder }) => {
- const handleChange = (e) => {
- setPrice(e.target.value);
- setOrder(e.target.name);
- };
-
- return (
-
-
- }
- >
- Sort By
-
-
- Price: Low-High
- Price: High-Low
- Rating: Low-High
- Rating: High-Low
- Name: A-Z
- Name: Z-A
-
-
-
- );
-};
diff --git a/minishop/src/Routes/AllRoutes.jsx b/minishop/src/Routes/AllRoutes.jsx
deleted file mode 100644
index bfc166a..0000000
--- a/minishop/src/Routes/AllRoutes.jsx
+++ /dev/null
@@ -1,107 +0,0 @@
-import { Route, Routes } from "react-router-dom";
-import Home from "../Pages/Home/Home";
-import SinglePage from "../Pages/SingleProduct/SinglePage";
-import Admin from "../admin/adminHome/Admin";
-import AdminLogin from "../admin/adminAuth/AdminLogin";
-import AdminContext from "../admin/adminContext/AdminContext";
-import DSign from "../DemoPagesBySachin/DSign";
-import DLogin from "../DemoPagesBySachin/DLogin";
-import Cart from "../Pages/Cart/Cart";
-import Address from "../Pages/checkout/Address";
-import Payment from "../Pages/checkout/Payment";
-import PrivateRoute from "../Pages/login&signup/PrivateRoute";
-import Order from "../Pages/Order/Order";
-import Wishlist from "../Pages/Wishlist/Wishlist";
-
-import AllUsers from "../admin/adminComp/AllUsers";
-import AllSellers from "../admin/adminComp/AllSellers";
-import Products from "../Pages/products/Products";
-
-
-
-function Allroute() {
- return (
- <>
-
- } />
-
- {/* } />
- } /> */}
- }>
-
-
-
- }
- />
-
-
-
- }
- />
-
-
- {/* }> */}
- } />
- } />
-
- } />
- }>
-
-
- }>
-
- {" "}
-
- }
- >
-
- {" "}
-
- }
- >
-
- {" "}
-
- }
- >
-
-
-
- }
- />
- } />
-
-
-
- }
- />
- {/* demoRoutes........................ */}
- } />
- } />
-
- >
- );
-}
-
-export default Allroute;
diff --git a/minishop/src/admin/AddProduct/EditModal.jsx b/minishop/src/admin/AddProduct/EditModal.jsx
deleted file mode 100644
index af370dc..0000000
--- a/minishop/src/admin/AddProduct/EditModal.jsx
+++ /dev/null
@@ -1,81 +0,0 @@
-import React, { useState } from 'react'
-import {
- Modal,
- ModalOverlay,
- ModalContent,
- ModalHeader,
- ModalFooter,
- ModalBody,
- Button,
- ModalCloseButton,
- FormControl,
- useDisclosure,
- Input,
- FormLabel,
- Textarea,
- Text,
- Image,
- Grid,
- } from '@chakra-ui/react'
-// import { useState } from 'react'
-
-const EditModal = ({show,data}) => {
- const { isOpen, onOpen, onClose } = useDisclosure()
- const initialRef = React.useRef(null)
- const finalRef = React.useRef(null)
- const [product, setProduct] = useState({})
-
- const updateProduct = ()=>{
- onClose()
- }
- const handleChange = (e)=>{
- setProduct({...product,[e.target.name]:e.target.value })
- }
-
- return (
- <>
-
-
-
-
- Add Product
-
-
-
- Category *
-
-
-
- Product Brand *
-
-
-
- Product Name *
-
-
-
-
-
- {data.image?.map((el,id)=> )}
-
- Product Detail *
-
-
-
-
- Update Product
-
- Cancel
-
-
-
- >
- )
-}
-
-export default EditModal;
\ No newline at end of file
diff --git a/minishop/src/admin/AddProduct/Modal.jsx b/minishop/src/admin/AddProduct/Modal.jsx
deleted file mode 100644
index 77235d1..0000000
--- a/minishop/src/admin/AddProduct/Modal.jsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import React from 'react'
-import {
- Modal,
- ModalOverlay,
- ModalContent,
- ModalHeader,
- ModalFooter,
- ModalBody,
- Button,
- ModalCloseButton,
- FormControl,
- useDisclosure,
- Input,
- FormLabel,
- Textarea,
- Text,
- } from '@chakra-ui/react'
-
-const AdModal = ({showModal}) => {
- const { isOpen, onOpen, onClose } = useDisclosure()
-
- const initialRef = React.useRef(null)
- const finalRef = React.useRef(null)
- return (
- <>
-
-
-
-
- Add Product
-
-
-
- Category *
-
-
-
- Product Brand *
-
-
-
- Product Name *
-
-
-
- Product Detail *
-
-
-
- Image 1 url *
-
- Image 2 url *
-
- Image 3 url *
-
- Image 4 url *
-
-
-
-
-
- Add
-
- Cancel
-
-
-
- >
- )
-}
-
-export default AdModal
\ No newline at end of file
diff --git a/minishop/src/admin/adminAuth/AdminLogin.jsx b/minishop/src/admin/adminAuth/AdminLogin.jsx
deleted file mode 100644
index 2a40506..0000000
--- a/minishop/src/admin/adminAuth/AdminLogin.jsx
+++ /dev/null
@@ -1,88 +0,0 @@
-import {
- Flex,
- Box,
- FormControl,
- FormLabel,
- Input,
- Checkbox,
- Stack,
- Link,
- Button,
- Heading,
- Text,
- useColorModeValue,
- useToast,
- } from '@chakra-ui/react';
-import { useState,} from 'react';
-import {useDispatch,useSelector } from 'react-redux'
-import { getAdminAuth } from '../../redux/admin_auth/admin.actions';
-export default function AdminLogin() {
- const toast = useToast()
- const {loading, error} = useSelector(val=>val.adminAuth)
- const [user, setUser] = useState({email:'',password:""})
- const dispatch = useDispatch()
- const handleLogin = ()=>{
- dispatch(getAdminAuth(user))
- }
- const handleChange = (e)=>{
- setUser({...user, [e.target.name]:e.target.value })
- }
- return (
-
-
-
- Admin Sign In
-
- Make Sure you have Admin Access
-
-
-
-
-
- Email address
-
-
-
- Password
-
-
-
-
- Remember me
- Forgot password?
-
-
- Sign in
-
-
-
-
-
- {
- error?toast({
- title: `Invalid Credentials !`,
- status: 'error',
- isClosable: true,
- }):null
- }
-
- );
- }
\ No newline at end of file
diff --git a/minishop/src/admin/adminComp/AllSellers.jsx b/minishop/src/admin/adminComp/AllSellers.jsx
deleted file mode 100644
index 4520a99..0000000
--- a/minishop/src/admin/adminComp/AllSellers.jsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import {Flex, Heading, Image } from '@chakra-ui/react'
-import React from 'react'
-import { useNavigate } from 'react-router-dom'
-
-const AdminSellers = () => {
- const nav = useNavigate()
- return (
-
-
- nav('/admin')} borderBottom='2px' h='fit-content' cursor='pointer' color='blue' >Go Back To Home
-
- )
-}
-
-export default AdminSellers
\ No newline at end of file
diff --git a/minishop/src/admin/adminComp/AllUsers.jsx b/minishop/src/admin/adminComp/AllUsers.jsx
deleted file mode 100644
index 8a09407..0000000
--- a/minishop/src/admin/adminComp/AllUsers.jsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import { Flex, Heading } from '@chakra-ui/react'
-import React, { useEffect} from 'react'
-import { getAllUsers, getProdCatagoty, getProductsAdmin } from '../../redux/admin_data/admin.action'
-import AdminNav from '../adminHome/AdminNav'
-import { useDispatch, useSelector } from "react-redux";
-import UserTable from './UserTable';
-
-const AdmnUsers = () => {
- const dispatch = useDispatch()
- const allUsers = useSelector(val=>val.adminAll?.allUsers)
- const handleCategory = (e)=>{
- if(e.target.value===''){
- dispatch(getProductsAdmin(1));
- }else{
- dispatch(getProdCatagoty(e.target.value))
- }
- }
- useEffect(() => {
- dispatch(getAllUsers())
- }, [])
-
- const total = 0;
- const toggleshow=()=>{}
- const sloading=false
- const catagory = ['user1']
-
-
-
-
- return (
- <>
-
-
- All Users
-
-
- >
- )
-}
-
-export default AdmnUsers
\ No newline at end of file
diff --git a/minishop/src/admin/adminComp/UserTable.jsx b/minishop/src/admin/adminComp/UserTable.jsx
deleted file mode 100644
index 1ad3aad..0000000
--- a/minishop/src/admin/adminComp/UserTable.jsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import {
- Table,
- Thead,
- Tbody,
- Tfoot,
- Tr,
- Th,
- Td,
- TableContainer,
- Text,
- Image,
-} from "@chakra-ui/react";
-const UserTable = ({ data,toggleshow,sloading }) => {
- return (
-
-
-
-
- id
- Status
- Name
- Email
- Cart
- wishlist
- Orders
-
-
-
- {data.map((el,id) => {
- return (
-
- {el.id.split('').slice(0,6).join('')}...
-
- {el.name}
- {el.email}
- Cart
- Wishlist
- Orders
-
- );
- })}
-
- Total Users: {data.length}
-
-
- );
-};
-export default UserTable;
\ No newline at end of file
diff --git a/minishop/src/admin/adminContext/AdminContext.jsx b/minishop/src/admin/adminContext/AdminContext.jsx
deleted file mode 100644
index acdd02e..0000000
--- a/minishop/src/admin/adminContext/AdminContext.jsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import {useSelector} from 'react-redux'
-import AdminLogin from '../adminAuth/AdminLogin'
-
-const AdminContext = ({children}) => {
- let isauth = useSelector(val=>val.adminAuth.isAuth)
-if(isauth){
- return children
-}
-else{
- return
-}
-}
-
-export default AdminContext
\ No newline at end of file
diff --git a/minishop/src/admin/adminHome/Admin.jsx b/minishop/src/admin/adminHome/Admin.jsx
deleted file mode 100644
index 421c8f9..0000000
--- a/minishop/src/admin/adminHome/Admin.jsx
+++ /dev/null
@@ -1,120 +0,0 @@
-/* eslint-disable react-hooks/exhaustive-deps */
-import { useEffect, useState } from "react";
-import axios from "axios";
-import ItemTable from "./Table/ItemTable";
-import AdminNav from "./AdminNav";
-import { Box, Button, Flex, Heading, Text } from "@chakra-ui/react";
-import { ChevronLeftIcon, ChevronRightIcon } from "@chakra-ui/icons";
-import { getAllProducts, getProdCatagoty, getProductsAdmin } from "../../redux/admin_data/admin.action";
-import { useDispatch, useSelector } from "react-redux";
-const AdminHome = () => {
- const dispatch = useDispatch()
- const [sloading, setsLoading] = useState(false);
- const {loading, error, products,allProd}= useSelector(val=>val.adminAll)
- const [page, setPage] = useState(1);
- const [view, setView ] = useState(true)
- const [total, setTotal ] = useState(0)
- const [cat, setCat] = useState([])
- useEffect(() => {
- dispatch(getProductsAdmin(page));
- }, [dispatch, page]);
-
- let obj = {}
- const catagory = []
- useEffect(()=>{
- dispatch(getAllProducts())
- if(allProd.length>0){
- setTotal(allProd.length)
- allProd.forEach((el)=>{
- if(obj[el.Categories]===undefined){
- obj[el.Categories]=1
- }else{
- obj[el.Categories]++
- }
- })
- }
- for(let key in obj){
- catagory.push(key)
- }
- setCat(catagory)
- },[allProd.length, dispatch])
-
- const toggleshow = (id) => {
- let dta = products.filter((el) => {
- if (el.id === id) {
- el.show = !el.show;
- return el;
- }
- return null;
- });
- editData(id, dta[0]);
- };
- const editData = async (id, data) => {
- try {
- setsLoading(true);
- await axios.patch(
- `https://lackadaisical-volcano-larch.glitch.me/data/${id}`,
- data
- );
- setsLoading(false);
- } catch (err) {
- }
- };
- // Catgory request on Changing category
- const handleCategory = (e)=>{
- if(e.target.value===''){
- dispatch(getProductsAdmin(page));
- setView(true)
- }else{
- dispatch(getProdCatagoty(e.target.value))
- setView(false)
- }
- }
- if (error) {
- return Some Error from Server Occured ;
- }
- return (
-
-
-
- {/* ItemTable */}
-
-
- {/* Pagination */}
- {view &&
-
- setPage((val) => val - 1)}
- >
-
-
-
- {page}
- setPage((val) => val + 1)}
- >
-
-
-
- }
-
- );
-};
-
-export default AdminHome;
diff --git a/minishop/src/admin/adminHome/AdminNav.jsx b/minishop/src/admin/adminHome/AdminNav.jsx
deleted file mode 100644
index f125a68..0000000
--- a/minishop/src/admin/adminHome/AdminNav.jsx
+++ /dev/null
@@ -1,141 +0,0 @@
-import {
- Box,
- Flex,
- Avatar,
- HStack,
- Link,
- IconButton,
- Button,
- Menu,
- MenuButton,
- MenuList,
- MenuItem,
- MenuDivider,
- useDisclosure,
- useColorModeValue,
- Stack,
- useColorMode,
- Image,
- Select,
-} from "@chakra-ui/react";
-import { useRef } from "react";
-import {useNavigate} from 'react-router-dom'
-import { HamburgerIcon, CloseIcon, MoonIcon, SunIcon, AddIcon } from "@chakra-ui/icons";
-import {useDispatch, } from 'react-redux'
-import { adminLogout } from "../../redux/admin_auth/admin.actions";
-import AdModal from "../AddProduct/Modal";
-export default function AdminNav({handleCategory,catagory}) {
- const navigate = useNavigate()
-
- const { colorMode, toggleColorMode } = useColorMode();
- const { isOpen, onOpen, onClose } = useDisclosure();
- const dispatch = useDispatch()
-
- // Log-out functionality
-
- const handleSignout = ()=>{
- dispatch(adminLogout())
- }
- // showUsers functionality
- const showUsers = ()=>{
- navigate("/admin/users")
- }
-
- // showSellers Functionality
- const showSellers=()=>{
- navigate("/admin/sellers")
- }
-
- // Addproduct funcationality
- const showModal = useRef(null)
- const addProd = ()=>{
- showModal.current.click()
- }
-
-
- return (
- <>
-
-
- : }
- aria-label={"Open Menu"}
- display={{ md: "none" }}
- onClick={isOpen ? onClose : onOpen}
- />
-
- navigate('/admin')} border='1px' overflow="hidden">
-
-
-
-
-
- {catagory.map((el,id)=>{el} )}
- {/* Jacket
- watch
- mobile
- Headphones
- bags
- shoes */}
-
-
-
- Users
-
-
- Sellers
-
- Product
-
-
-
-
-
-
-
- {colorMode === "light" ? : }
-
-
-
-
-
- Profile
- Settings
-
- Log-Out
-
-
-
-
-
- {isOpen ? (
-
-
- Users
- Sellers
- Add Product
- ))
-
-
- ) : null}
-
-
- >
- );
-}
diff --git a/minishop/src/admin/adminHome/Table/ItemTable.jsx b/minishop/src/admin/adminHome/Table/ItemTable.jsx
deleted file mode 100644
index 5513666..0000000
--- a/minishop/src/admin/adminHome/Table/ItemTable.jsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import { ViewIcon, EditIcon, ViewOffIcon } from "@chakra-ui/icons";
-import {
- Table,
- Thead,
- Tbody,
- Tfoot,
- Tr,
- Th,
- Td,
- TableContainer,
- useToast,
- Spinner,
- Text,
- Image,
-} from "@chakra-ui/react";
-import { useState } from "react";
-import { useRef } from "react";
-import EditModal from "../../AddProduct/EditModal";
-
-const ItemTable = ({ data,total, toggleshow,sloading }) => {
- const toast = useToast()
- const showMsg = (msg, status,el)=>{
- toggleshow(el.id)
- toast({
- title: `${el.name + " " + msg }`,
- status: status,
- isClosable:true,
- position:'top-right'
- })
- }
- const [dataa, setDataa] = useState({})
- const showModal = useRef(null)
- const editItem = (el)=>{
- showModal.current.click()
- setDataa(el)
- }
-
- return (
- <>
-
-
-
-
- id
- Catagory
- Name
- Brand
- Image
- Edit
- Disable
-
-
-
- {data.map((el,id) => {
- return (
-
- {el.id}
- {el.Categories}
- {el.name.split(' ').slice(0,4).join(' ')}
- {el.brand}
-
- editItem(el)} />
- { sloading? :
- {el.show === true ?showMsg(`is out of Stock now`,'warning',el)} /> : showMsg(`is Back in Stock`,'success',el)} />} }
-
- );
- })}
-
- Total Items in Inventory: {total}
-
-
-
- >
- );
-};
-
-export default ItemTable;
diff --git a/minishop/src/components/Footer/Footer.jsx b/minishop/src/components/Footer/Footer.jsx
deleted file mode 100644
index 359862f..0000000
--- a/minishop/src/components/Footer/Footer.jsx
+++ /dev/null
@@ -1,124 +0,0 @@
-import { Box, Flex, Spacer, Text } from '@chakra-ui/react'
-import React from 'react'
-import {FaFacebookF,FaTwitter,FaPinterestP,FaApple} from 'react-icons/fa';
-import {IoLogoGooglePlaystore} from "react-icons/io5";
- const Footer = ({display='flex'}) => {
- return (
-
-{/*--------------------------------- Top Footer --------------------------------------------*/}
-
-
-
- LED Light
- Paints
- Corporate Gifts
- Geysers
- Welding
- tooling and Cutting
-
-
-
-
- Abrasives
- Power Tools
- Pumps
- Safety
- Bearings
- Cleaning
-
-
-
-
- Dimension Measurement
- Electrical
- Electronics & Robotics
- Fasteners
- Furniture, Hospitality and Food Service
- Hand Tools
-
-
-
-
- Hydraulics
- IT & Electronics
- Industrial Automation
- Lab Supplies
- Machinery
- Machining Accessories
-
-
-
-
- Medical Supplies & Equipment
- Office Supplies
- Plumbing
- Pneumatics
- Automotive Maintenance and Accessories
- Security
-
-
- {/*--------------------------------- Bottom Footer --------------------------------------------*/}
-
-
-
- Company
- About Us
- Contact Us
- Careers
- Sell On Industrybuying
- Special offers
- Articles
-
-
-
-
- Help
- FAQs
- Report Infringement
- Cancellations & Returns
- -
- Have a question or want to place an order?
- Helpline Number: Call: +91 8448449073
-
-
-
-
- Connect with us
-
-
-
- -
- Download Our APP!
-
-
-
-
-
-
-
- Subscribe to Newsletter
-
- Sign up to get exclusive offers from our favorite brands
- and to be well up in the news
-
-
-
-{/*--------------------------------- Bottom Footer line --------------------------------------------*/}
-
- Copyright © industrybuying.com 2013-2022 All Right Reserved | Privacy Policy | Terms & Conditions
-
-
- )
-}
-
-export default Footer
\ No newline at end of file
diff --git a/minishop/src/components/Footer/Footer.scss b/minishop/src/components/Footer/Footer.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/minishop/src/components/Navbar/Navbar.css b/minishop/src/components/Navbar/Navbar.css
deleted file mode 100644
index e69de29..0000000
diff --git a/minishop/src/components/Navbar/Navbar.jsx b/minishop/src/components/Navbar/Navbar.jsx
deleted file mode 100644
index f50d575..0000000
--- a/minishop/src/components/Navbar/Navbar.jsx
+++ /dev/null
@@ -1,378 +0,0 @@
-import React, { useEffect, useState } from "react";
-import {
- Box,
- Flex,
- Menu,
- MenuButton,
- Button,
- MenuList,
- MenuItem,
- Heading,
- Spacer,
- ButtonGroup,
- SimpleGrid,
- useDisclosure,
- Drawer,
- DrawerOverlay,
- DrawerContent,
- DrawerHeader,
- DrawerBody,
- Image,
- Divider,
- Center,
- Avatar
-} from "@chakra-ui/react";
-import { Link, useNavigate } from "react-router-dom";
-import { HamburgerIcon } from "@chakra-ui/icons";
-import { HiOutlineShoppingCart } from "react-icons/hi";
-import {MdRemoveShoppingCart} from "react-icons/md"
-import { ReactSearchAutocomplete } from "react-search-autocomplete";
-import {FaShoppingCart, FaUserCircle} from "react-icons/fa";
-import {BsFillHeartFill,BsFacebook} from "react-icons/bs";
-import {BiLogIn} from "react-icons/bi";
-import {FcGoogle} from "react-icons/fc";
-import "./Navbar.css";
-import { useDispatch, useSelector } from "react-redux";
-
-import { addNewUser, logoutUser } from "../../redux/AddUser/User.actions";
-import { userLogout } from "../../redux/Auth/auth.actions";
-import {
- Badge,
- Dropdown,
- Nav,
-} from "react-bootstrap";
-import {
- cartActions,
-} from "../../redux/Cart/Cart.actions";
-
-
-export default function Navbar({ display = "flex" }) {
-
- const { isOpen, onOpen, onClose } = useDisclosure();
- const [data, setData] = useState([]);
- const nav = useNavigate();
- const { isauth, userData } = useSelector((val) => val.authUser);
-
- const dispatch = useDispatch()
-
- const {cartData} = useSelector((store) => store.cart);
-
-
-
- useEffect(() => {
- dispatch(cartActions())
- if(isauth){
- dispatch(addNewUser(userData))
- }
-}, [cartData.length,isauth])
-
- const getHomeData = async () => {
- try {
- const res = await fetch(
- "https://lackadaisical-volcano-larch.glitch.me/data"
- );
- const HomeData = await res.json();
- setData(HomeData);
- } catch (error) {
- console.log("e", error);
- }
- };
- useEffect(() => {
- getHomeData();
- }, []);
-
- const handleLogout= ()=>{
- dispatch(userLogout())
-
- dispatch(logoutUser(userData))
-
- nav(`/DLogin`)
-
- }
-
- const handleOnSearch = (string, results) => {
- // onSearch will have as the first callback parameter
- // the string searched and for the second the results.
- // console.log(string, results);
- };
- const handleOnHover = (result) => {
- // the item hovered
- //console.log(result);
- };
- const handleOnSelect = (item) => {
- // the item selected
- // console.log(item, item.id);
- nav(`/data/${item.id}`);
- };
- const handleOnClear = () => {
- //console.log("Cleared");
- };
- const handleOnFocus = () => {
- //console.log("Focused");
- };
- const formatResult = (item) => {
- return (
- <>
-
- Brand: {item.brand}
-
-
- name: {item.name}
-
- >
- );
- };
- return (
-
-{/*----------------------------------- Drawer ----------------------------------*/}
-
- }>
-
-
-
-
-
-
- Product Categories
-
- nav(`/`)} >
- Home
-
- nav(`/products/t_shirt`)} >
- T-Shirts
-
- nav(`/products/Jacket`)} />
-
- Jackets
-
-
- nav(`/products/bags`)} >
- Bags
-
-
- nav(`/products/watch`)}>
- Watch
-
-
- -
- nav(`/cart`)}>
- Cart
-
-
- nav(`/wishlist`)} >
- Wishlist
-
-
- -
- nav(`/DLogin`)} >
- Login
-
-
- nav(`/sign`)} >
- Sign Up
-
-
- -
-
- App Store
-
-
-
-
-
-
-
- nav(`/`)} cursor='pointer' display={{md:"block",lg:"block",base:"none"}}>
-
- {/* nav `/`} >i */}
-
-
-
-{/*-------------------------------- Categories ----------------------------------------------*/}
-
-
- CATEGORIES
-
- {/* MenuItems are not rendered unless Menu is open */}
-
- nav(`/products/t_shirt`)}
- color={'black'}
- >
- T-Shirts
-
- nav(`/products/Jacket`)}
- color={'black'}
- > Jackets
-
- nav(`/products/bags`)}
- color={'black'}
- > Bags
-
- nav(`/products/watch`)}
- color={'black'}
- > Watches
-
- nav(`/products/Headphones`)}
- color={'black'}
- >
- Headphones
-
- nav(`/products/Headphones`)}
- color={'black'}
- >
- Boat Speakers
-
- nav(`/products/shoes`)}
- color={'black'}
- > Shoes
-
- nav(`/products/mobile`)}
- color={'black'}
- > Mobiles
-
-
-
-
-
-
- {/*-------------------------------- INPUT FIELD ----------------------------------------------*/}
-
-
-
-
- {/*-------------------------------- Sign in and Cart buttons ----------------------------------------------*/}
-
-
- {/*-------------------------------- Signin Button ----------------------------------------------*/}
-
-
-
-
- {isauth? : }>
- }
-
- {isauth?
-
-
-
-
-
- {userData.name}
-
- nav(`/orders`)} >orders
- nav(`/whishlist`)} >whishlist
-
- Logout
-
-
- :
- nav(`/DLogin`)} >Log in
- nav(`/sign`)} >Register
- }
-
-
- {/*-------------------------------- Cart Button ----------------------------------------------*/}
- {
-
-
-
-
-
-
- {cartData.length > 0 ? (
- <>
- {cartData.map((prod) => (
-
-
-
- {prod.name}
- {prod.price}
-
-
-
- ))}
-
-
- Go To Cart
-
-
- >
- ) : (
-
- Cart Is Empty
-
-
- )}
-
-
- }
- {cartData?.length > 0 ? ( {cartData?.length} )
- :""
- }
-
-
-
- )
-}
\ No newline at end of file
diff --git a/minishop/src/components/Navbar/Navbar.scss b/minishop/src/components/Navbar/Navbar.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/minishop/src/components/Navbar/NavbarNew.jsx b/minishop/src/components/Navbar/NavbarNew.jsx
deleted file mode 100644
index c6af711..0000000
--- a/minishop/src/components/Navbar/NavbarNew.jsx
+++ /dev/null
@@ -1,109 +0,0 @@
-import { Box, ButtonGroup, Flex, Menu, MenuButton, MenuItem, MenuList } from '@chakra-ui/react';
-
-import Button from 'react-bootstrap/Button';
-import Container from 'react-bootstrap/Container';
-import Form from 'react-bootstrap/Form';
-import Nav from 'react-bootstrap/Nav';
-import Navbar from 'react-bootstrap/Navbar';
-import NavDropdown from 'react-bootstrap/NavDropdown';
-import { FaUserCircle } from 'react-icons/fa';
-import { HiOutlineShoppingCart } from 'react-icons/hi';
-
-function NavScrollExample() {
- return (
-
-
- Navbar scroll
-
-
-
- Home
-
-
- Action
-
- Another action
-
-
-
- Something else here
-
-
-
-
-
- Search
-
-
-
- {/*-------------------------------- Signin Button ----------------------------------------------*/}
-
-
-
-
- }>
- {/*
- Sign In
- */}
-
-
-
- Login
- SignIn
- Your Orders
-
-
-
- {/*-------------------------------- Trck order Button ----------------------------------------------*/}
- {/* }>
-
- Track Order
-
- */}
-
- {/*-------------------------------- Cart Button ----------------------------------------------*/}
-
- }>
- {/*
- CART
- */}
-
-
-
-
-
-
-
- );
-}
-
-export default NavScrollExample;
\ No newline at end of file
diff --git a/minishop/src/index.css b/minishop/src/index.css
deleted file mode 100644
index ec2585e..0000000
--- a/minishop/src/index.css
+++ /dev/null
@@ -1,13 +0,0 @@
-body {
- margin: 0;
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
- 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
- sans-serif;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-code {
- font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
- monospace;
-}
diff --git a/minishop/src/index.js b/minishop/src/index.js
deleted file mode 100644
index c5ae6d1..0000000
--- a/minishop/src/index.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import React from 'react';
-import ReactDOM from 'react-dom/client';
-import './index.css';
-import App from './App';
-import reportWebVitals from './reportWebVitals';
-import { ChakraProvider } from '@chakra-ui/react';
-import AuthContextProvider from './Pages/login&signup/AuthContextProvider';
-import { BrowserRouter } from "react-router-dom";
-import { Provider } from 'react-redux';
-
-import {store} from "./redux/store"
-const root = ReactDOM.createRoot(document.getElementById('root'));
-root.render(
-
-
-
-
-
-
-
-
-
-
-
-);
-
-// If you want to start measuring performance in your app, pass a function
-// to log results (for example: reportWebVitals(console.log))
-// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
-reportWebVitals();
diff --git a/minishop/src/redux/AddUser/User.actionTypes.js b/minishop/src/redux/AddUser/User.actionTypes.js
deleted file mode 100644
index 48bb9d3..0000000
--- a/minishop/src/redux/AddUser/User.actionTypes.js
+++ /dev/null
@@ -1,2 +0,0 @@
-export const USER_ADD_SUCCESS = 'user/add/success'
-export const USER_ADD_FAIL = 'user/add/failed'
diff --git a/minishop/src/redux/AddUser/User.actions.js b/minishop/src/redux/AddUser/User.actions.js
deleted file mode 100644
index 96855d4..0000000
--- a/minishop/src/redux/AddUser/User.actions.js
+++ /dev/null
@@ -1,63 +0,0 @@
-import { async } from '@firebase/util'
-import {USER_ADD_FAIL, USER_ADD_SUCCESS} from './User.actionTypes'
-import { addNewUserApi, getUserApi, logoutUserApi, updateUserApi, userCartUpdateApi } from './User.api'
-
-
-export const getUser = (id) => async(dispatch) =>{
- try{
- let res = await getUserApi(id)
- return res.data
- }catch(err){
- console.log(err)
- }
-}
-
-
-export const addNewUser = (userData)=> async(dispatch)=>{
- let newData = {
- profile:userData.profile,
- active:true,
- name:userData.name,
- email:userData.email,
- id:userData.id,
- cart:[],
- whishList:[],
- orders:[],
- }
- console.log(userData)
- try{
- let res = await addNewUserApi(newData)
- dispatch({type:USER_ADD_SUCCESS, payload:res})
- }catch(err){
- dispatch ({type:USER_ADD_FAIL})
- }
-}
-
-export const logoutUser = (userdata)=> async(dispatch)=>{
- let userStatus = {...userdata,active:false}
- try{
- let res = logoutUserApi(userStatus)
- }catch(err){
- console.log(err)
- }
-}
-
-
-export const updateUser = (userdata) => async(dispatch)=>{
- try{
- let res = await updateUserApi({...userdata,active:true})
- // console.log('resupdate:', res)
- } catch(er){
- console.log(er)
- }
-}
-
-
-export const userCartUpdate = (userData) => async(dispatch) => {
- try{
- let res = await userCartUpdateApi(userData)
- console.log('userCartUpdate:', res)
- }catch(err){
-
- }
-}
\ No newline at end of file
diff --git a/minishop/src/redux/AddUser/User.api.js b/minishop/src/redux/AddUser/User.api.js
deleted file mode 100644
index 5ed9eda..0000000
--- a/minishop/src/redux/AddUser/User.api.js
+++ /dev/null
@@ -1,46 +0,0 @@
-import { async } from "@firebase/util"
-import axios from "axios"
-
-export const getUserApi = async (id) => {
- return await axios.get(`https://lackadaisical-volcano-larch.glitch.me/user/${id}`)
-}
-
-export const addNewUserApi = async(userData)=>{
- try{
- let res = await axios.post(`https://lackadaisical-volcano-larch.glitch.me/user`,userData)
- return res
- }catch(err){
- return err
- }
-}
-
-export const logoutUserApi = async(userData)=>{
- try{
- let res = await axios.patch(`https://lackadaisical-volcano-larch.glitch.me/user/${userData.id}`,userData)
- console.log(res)
- // return res
- }catch(err){
- return err
- }
-}
-export const updateUserApi = async(userData)=>{
- console.log(userData)
- try{
- let res = await axios.patch(`https://lackadaisical-volcano-larch.glitch.me/user/${userData.id}`,userData)
-
- return res
- }catch(err){
- // return err
- }
-}
-
-
-export const userCartUpdateApi = async(userData) => {
- console.log('userData:', userData)
- try{
- let res = await axios.patch(`https://lackadaisical-volcano-larch.glitch.me/user/${userData.id}`,userData)
- return res
- }catch(er){
-
- }
-}
\ No newline at end of file
diff --git a/minishop/src/redux/AddUser/User.reducer.js b/minishop/src/redux/AddUser/User.reducer.js
deleted file mode 100644
index 08fd219..0000000
--- a/minishop/src/redux/AddUser/User.reducer.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import {USER_ADD_FAIL, USER_ADD_SUCCESS} from './User.actionTypes'
-
-const initialState = {
- islogin:false
-}
-export const userAddreducer = (state= initialState, {type, payload})=>{
- switch (type) {
- case USER_ADD_SUCCESS:{
- return{...state,islogin:true}
- }
- case USER_ADD_FAIL:{
- return{...state, islogin:false}
- }
-
- default:
- {return state}
- }
-}
\ No newline at end of file
diff --git a/minishop/src/redux/Auth/auth.action.types.js b/minishop/src/redux/Auth/auth.action.types.js
deleted file mode 100644
index bbd817c..0000000
--- a/minishop/src/redux/Auth/auth.action.types.js
+++ /dev/null
@@ -1,6 +0,0 @@
-export const LOGIN_SUCCESS = 'action/login/success';
-export const LOGIN_FAIL = 'action/login/fail';
-export const SIGNUP_SUCCESS = 'action/signup/success';
-export const SIGNUP_FAIL = 'action/signup/fail';
-export const RESET_USER_DATA = 'action/reset';
-export const LOGOUT_FAIL = 'acion/logout/fail'
\ No newline at end of file
diff --git a/minishop/src/redux/Auth/auth.actions.jsx b/minishop/src/redux/Auth/auth.actions.jsx
deleted file mode 100644
index 7664284..0000000
--- a/minishop/src/redux/Auth/auth.actions.jsx
+++ /dev/null
@@ -1,85 +0,0 @@
-import {
- LOGIN_SUCCESS,
-LOGIN_FAIL,
-SIGNUP_SUCCESS,
-SIGNUP_FAIL,
-RESET_USER_DATA,
-LOGOUT_FAIL,
-} from './auth.action.types'
-import {
- signOut,
- sendPasswordResetEmail,
- createUserWithEmailAndPassword,
- signInWithEmailAndPassword,
- // onAuthStateChanged,
- signInWithPopup,
-} from "firebase/auth";
-import { auth, provider } from "../../config";
-
-// user Login using email and password
-
-export const userLogin = async(user)=> (dispatch)=>{
- try{
- let res = signInWithEmailAndPassword(auth, user.email, user.password);
- dispatch({type:LOGIN_SUCCESS,payload:res})
- }catch(err){
- dispatch({type:LOGIN_FAIL,})
- }
-}
-
-// user signup using data
-
-export const userSignup = async(email,password)=>(dispatch)=>{
- try{
- let res = createUserWithEmailAndPassword(auth, email, password);
- dispatch({type:SIGNUP_SUCCESS,payload:res})
- }catch(err){
- dispatch({type:SIGNUP_FAIL})
- }
-}
-// user signout
-
-// const unsubscribe = onAuthStateChanged(auth, (currentUser) => {
-// // console.log(currentUser);
-// setUser(currentUser);
-// });
-export const userLogout = () => async(dispatch)=> {
- try{
- await signOut(auth);
- dispatch({type:RESET_USER_DATA})
- }catch(err){
- dispatch({type:LOGOUT_FAIL})
- }
-};
-// user login using google auth
-
-export const loginWithGoogle = () => async(dispatch)=>{
- try {
- let res = await signInWithPopup(auth, provider);
- const userData = {
- active:true,
- name:res.user.displayName,
- email:res.user.email,
- profile:res.user.photoURL,
- id:res.user.uid,
- super:false
- }
- dispatch({type:LOGIN_SUCCESS,payload:userData})
- } catch (error) {
- console.log('google failed',error)
- dispatch({type:LOGIN_FAIL,payload:error})
- }
-};
-
-
-
-
-// forgot password functionality
-export const forgotPassword = (email) =>async(dispatch)=> {
- try{
- sendPasswordResetEmail(auth, email);
- }
- catch(er){
- console.log(er)
- }
-};
\ No newline at end of file
diff --git a/minishop/src/redux/Auth/auth.api.js b/minishop/src/redux/Auth/auth.api.js
deleted file mode 100644
index e69de29..0000000
diff --git a/minishop/src/redux/Auth/auth.reducer.js b/minishop/src/redux/Auth/auth.reducer.js
deleted file mode 100644
index 2cc1946..0000000
--- a/minishop/src/redux/Auth/auth.reducer.js
+++ /dev/null
@@ -1,40 +0,0 @@
-import {
- LOGIN_SUCCESS,
- LOGIN_FAIL,
- SIGNUP_SUCCESS,
- SIGNUP_FAIL,
- RESET_USER_DATA,
-// LOGOUT_FAIL
- } from './auth.action.types'
-
-let userDetails = JSON.parse(localStorage.getItem("userData"))
- const initialState = {
- status:false,
- userData:userDetails,
- isauth:userDetails?true:false
- }
-
- export const authReducerfunc = (state=initialState,{type,payload})=>{
- switch (type) {
- case LOGIN_SUCCESS:{
- localStorage.setItem("userData",JSON.stringify(payload))
- return {...state,status:true, isauth:true}
- }
- case LOGIN_FAIL:{
- return {...state, status:false}
- }
- case SIGNUP_SUCCESS:{
- return {}
- }
- case SIGNUP_FAIL:{
- return {}
- }
- case RESET_USER_DATA:{
- localStorage.removeItem("userData")
- return {...state, isauth:false,stauts:false}
- }
- default:{
- return {...state}
- }
- }
- }
\ No newline at end of file
diff --git a/minishop/src/redux/Cart/Cart.actionTypes.js b/minishop/src/redux/Cart/Cart.actionTypes.js
deleted file mode 100644
index 45b8f28..0000000
--- a/minishop/src/redux/Cart/Cart.actionTypes.js
+++ /dev/null
@@ -1,11 +0,0 @@
-export const CART_GET_LOADING = "cart/get/loading"
-
-export const CART_GET_ERROR = "cart/get/error"
-
-export const CART_GET_SUCCESS = "cart/get/success"
-
-export const CART_UPDATE_DATA = "cart/update"
-
-export const CART_REMOVE = "cart/delete"
-
-export const TOTAL_PRICE = "cart/totalPrice"
\ No newline at end of file
diff --git a/minishop/src/redux/Cart/Cart.actions.js b/minishop/src/redux/Cart/Cart.actions.js
deleted file mode 100644
index 190a992..0000000
--- a/minishop/src/redux/Cart/Cart.actions.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import {
- CART_GET_LOADING,
- CART_GET_SUCCESS,
- CART_GET_ERROR,
- CART_UPDATE_DATA,
- CART_REMOVE,
- TOTAL_PRICE
-} from "./Cart.actionTypes"
-
-import { deleteCart, getCartAPI, updateCart, updateCartApi } from "./Cart.api"
-
-export const cartActions = (userName) => async(dispatch) => {
- dispatch({type: CART_GET_LOADING});
- try{
- let data = await getCartAPI(userName);
- dispatch({type:CART_GET_SUCCESS,payload:data[0].cart})
- }catch(e){
- dispatch({type: CART_GET_ERROR})
- }
-}
-export const updateCarts = (newData) => async(dispatch) => {
- try{
-
- let data = await updateCartApi(newData);
- // dispatch({type:CART_UPDATE_DATA,payload:data})
- }catch(e){
- dispatch({type:CART_GET_ERROR})
- }
-}
-
-
-export const deleteCartItem = (id) => async(dispatch) => {
- let data1 = await deleteCart(id);
- dispatch({type:CART_REMOVE,payload:id})
-}
-
-
-export const cartValue = (total) => (dispatch) => {
- dispatch({type:TOTAL_PRICE,payload:total})
-}
-
diff --git a/minishop/src/redux/Cart/Cart.api.js b/minishop/src/redux/Cart/Cart.api.js
deleted file mode 100644
index 602b5e1..0000000
--- a/minishop/src/redux/Cart/Cart.api.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import axios from "axios";
-
-export const getCartAPI = async(userName) => {
- let res = await axios.get(`https://lackadaisical-volcano-larch.glitch.me/user?name=${userName}`);
- return res.data;
-}
-
-
-export const updateCartApi = async(newData) => {
- try{
- let res = await axios.post(`https://lackadaisical-volcano-larch.glitch.me/user?name=${newData.name}`,newData.cart);
- console.log(res)
- }catch(err){
- console.log("errrroroeroer is",err)
- }
-}
-export const deleteCart = async(id) => {
- try{
- let res = await axios.delete(`https://lackadaisical-volcano-larch.glitch.me/cart/${id}`);
- return res;
- }catch(err){
- return err;
- }
-}
-
\ No newline at end of file
diff --git a/minishop/src/redux/Cart/Cart.reducer.js b/minishop/src/redux/Cart/Cart.reducer.js
deleted file mode 100644
index f0674cc..0000000
--- a/minishop/src/redux/Cart/Cart.reducer.js
+++ /dev/null
@@ -1,87 +0,0 @@
-import {
- CART_GET_LOADING,
- CART_GET_SUCCESS,
- CART_GET_ERROR,
- CART_UPDATE_DATA,
- CART_REMOVE,
- TOTAL_PRICE
-} from "./Cart.actionTypes"
-
-let initialState = {
- loading:false,
- error:false,
- cartData:[],
- totalPrice:0,
-}
-
-
-
-export const cartReducer = (state = initialState ,{type,payload})=>{
- switch(type){
- case CART_GET_LOADING:{
- return {
- ...state,
- loading:true
- }
- }
- case CART_GET_ERROR:{
- return {
- ...state,
- loading:false,
- error:true,
- }
- }
-
- case CART_GET_SUCCESS:{
- const changePrice = (str) => {
- let res = str.replace(/\D/g, "");
- return parseInt(res);
- };
- let sum = payload.reduce(
- (acc, el) => {
- return acc + changePrice(el.price) * el.qty
- },
- 0
- )
- return {
- ...state,
- loading:false,
- cartData:payload,
- totalPrice: sum
- }
- }
-
- case CART_UPDATE_DATA:{
-
- const qtyValue = state.cartData.map((cart) =>{
- if( cart.id === payload.id){
- cart.qty = payload.qty
- }
- return cart;
- })
-
- return {
- ...state,
- cartData: qtyValue
- }
- }
-
- case CART_REMOVE:{
- return {
- ...state,
- cartData:state.cartData.filter((cart)=> cart.id !== payload.id)
- }
- }
-
- case TOTAL_PRICE : {
- return {
- ...state,
- totalPrice:payload
- }
- }
-
- default : {
- return state;
- }
- }
-}
\ No newline at end of file
diff --git a/minishop/src/redux/Order/Order.actionTypes.js b/minishop/src/redux/Order/Order.actionTypes.js
deleted file mode 100644
index df09aec..0000000
--- a/minishop/src/redux/Order/Order.actionTypes.js
+++ /dev/null
@@ -1,7 +0,0 @@
-export const ORDER_GET_LOADING = "order/get/loading"
-
-export const ORDER_GET_ERROR = "order/get/error"
-
-export const ORDER_GET_SUCCESS = "order/get/success"
-
-export const ORDER_REMOVE = "order/delete"
\ No newline at end of file
diff --git a/minishop/src/redux/Order/Order.actions.js b/minishop/src/redux/Order/Order.actions.js
deleted file mode 100644
index c8ad72e..0000000
--- a/minishop/src/redux/Order/Order.actions.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import {
- ORDER_GET_LOADING,
- ORDER_GET_SUCCESS,
- ORDER_GET_ERROR,
- ORDER_REMOVE
-} from "./Order.actionTypes"
-
-import { deleteOrder, getOrderAPI } from "./Order.api"
-
-export const orderActions = () => async(dispatch) => {
- dispatch({type: ORDER_GET_LOADING});
- try{
- let data = await getOrderAPI();
- dispatch({type:ORDER_GET_SUCCESS,payload:data})
-
- }catch(e){
- dispatch({type: ORDER_GET_ERROR})
- }
-}
-
-export const cancelOrder = (id) => async(dispatch) => {
- let data1 = await deleteOrder(id);
- dispatch({type:ORDER_REMOVE,payload:id})
-}
\ No newline at end of file
diff --git a/minishop/src/redux/Order/Order.api.js b/minishop/src/redux/Order/Order.api.js
deleted file mode 100644
index 675674b..0000000
--- a/minishop/src/redux/Order/Order.api.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import axios from "axios";
-
-export const getOrderAPI = async() => {
- let res = await axios.get(`https://lackadaisical-volcano-larch.glitch.me/cart`);
- return res.data;
-}
-
-
-export const deleteOrder = async(id) => {
- try{
- let res = await axios.delete(`https://lackadaisical-volcano-larch.glitch.me/cart/${id}`);
- return res;
- }catch(err){
- return err;
- }
-}
\ No newline at end of file
diff --git a/minishop/src/redux/Order/Order.reducer.js b/minishop/src/redux/Order/Order.reducer.js
deleted file mode 100644
index a8bcccf..0000000
--- a/minishop/src/redux/Order/Order.reducer.js
+++ /dev/null
@@ -1,49 +0,0 @@
-import {
- ORDER_GET_LOADING,
- ORDER_GET_SUCCESS,
- ORDER_GET_ERROR,
- ORDER_REMOVE
-} from "./Order.actionTypes"
-
-let initialState = {
- loading:false,
- error:false,
- orderData:[]
-}
-
-export const orderReducer = (state = initialState ,{type,payload})=>{
- switch(type){
- case ORDER_GET_LOADING:{
- return {
- ...state,
- loading:true
- }
- }
- case ORDER_GET_ERROR:{
- return {
- ...state,
- loading:false,
- error:true,
- }
- }
-
- case ORDER_GET_SUCCESS:{
- return {
- ...state,
- loading:false,
- orderData:payload,
- }
- }
-
- case ORDER_REMOVE:{
- return {
- ...state,
- orderData:state.orderData.filter((order)=> order.id !== payload.id)
- }
- }
-
- default : {
- return state;
- }
- }
-}
\ No newline at end of file
diff --git a/minishop/src/redux/Products/Cart.actions.js b/minishop/src/redux/Products/Cart.actions.js
deleted file mode 100644
index 84240af..0000000
--- a/minishop/src/redux/Products/Cart.actions.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// import React from 'react'
-
-// const Cart.actions = () => {
-// return (
-// Cart.actions
-// )
-// }
-
-// export default Cart.actions
-Guys Changes This according to your requirments
\ No newline at end of file
diff --git a/minishop/src/redux/SingleProducts/SingleProduct.actionTypes.js b/minishop/src/redux/SingleProducts/SingleProduct.actionTypes.js
deleted file mode 100644
index b2a949d..0000000
--- a/minishop/src/redux/SingleProducts/SingleProduct.actionTypes.js
+++ /dev/null
@@ -1,5 +0,0 @@
-export const SINGLE_GET_LOADING = "singlePage/get/loading"
-
-export const SINGLE_GET_ERROR = "singlePage/get/error"
-
-export const SINGLE_GET_SUCCESS = "singlePage/get/success"
\ No newline at end of file
diff --git a/minishop/src/redux/SingleProducts/SingleProduct.actions.js b/minishop/src/redux/SingleProducts/SingleProduct.actions.js
deleted file mode 100644
index 33895ec..0000000
--- a/minishop/src/redux/SingleProducts/SingleProduct.actions.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import {
- SINGLE_GET_LOADING,
- SINGLE_GET_SUCCESS,
- SINGLE_GET_ERROR
-} from "./SingleProduct.actionTypes"
-
-import { getSingleProductAPI } from "./SingleProduct.api"
-
-export const getSingleProduct = (id) => async(dispatch) => {
- dispatch({type: SINGLE_GET_LOADING});
- try{
- let data = await getSingleProductAPI(id);
- dispatch({type:SINGLE_GET_SUCCESS,payload:data})
-
- }catch(e){
- dispatch({type: SINGLE_GET_ERROR})
- }
-}
\ No newline at end of file
diff --git a/minishop/src/redux/SingleProducts/SingleProduct.api.js b/minishop/src/redux/SingleProducts/SingleProduct.api.js
deleted file mode 100644
index 59ee8f6..0000000
--- a/minishop/src/redux/SingleProducts/SingleProduct.api.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import axios from "axios";
-
-export const getSingleProductAPI = async(id) => {
- let res = await axios.get(`https://lackadaisical-volcano-larch.glitch.me/data/${id}`);
- // console.log('res:', res.data)
- return res.data;
-}
\ No newline at end of file
diff --git a/minishop/src/redux/SingleProducts/SingleProduct.reducer.js b/minishop/src/redux/SingleProducts/SingleProduct.reducer.js
deleted file mode 100644
index ffeb022..0000000
--- a/minishop/src/redux/SingleProducts/SingleProduct.reducer.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import {
- SINGLE_GET_LOADING,
- SINGLE_GET_SUCCESS,
- SINGLE_GET_ERROR
-} from "./SingleProduct.actionTypes"
-
-let initialState = {
- loading:false,
- error:false,
- itemDetail:{}
-}
-
-export const singleReducer = (state = initialState ,{type,payload})=>{
- switch(type){
- case SINGLE_GET_LOADING:{
- return {
- ...state,
- loading:true
- }
- }
- case SINGLE_GET_ERROR:{
- return {
- ...state,
- loading:false,
- error:true,
- }
- }
-
- case SINGLE_GET_SUCCESS:{
- return {
- ...state,
- loading:false,
- itemDetail:payload,
- }
- }
-
- default : {
- return state;
- }
- }
-}
\ No newline at end of file
diff --git a/minishop/src/redux/Wishlist/Wishlist.actionTypes.js b/minishop/src/redux/Wishlist/Wishlist.actionTypes.js
deleted file mode 100644
index 4fa9f29..0000000
--- a/minishop/src/redux/Wishlist/Wishlist.actionTypes.js
+++ /dev/null
@@ -1,7 +0,0 @@
-export const WISHLIST_GET_LOADING = "wishlist/get/loading"
-
-export const WISHLIST_GET_ERROR = "wishlist/get/error"
-
-export const WISHLIST_GET_SUCCESS = "wishlist/get/success"
-
-export const WISHLIST_REMOVE = "wishlist/delete"
\ No newline at end of file
diff --git a/minishop/src/redux/Wishlist/Wishlist.actions.js b/minishop/src/redux/Wishlist/Wishlist.actions.js
deleted file mode 100644
index 0662f3a..0000000
--- a/minishop/src/redux/Wishlist/Wishlist.actions.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import {
- WISHLIST_GET_ERROR,
- WISHLIST_GET_LOADING,
- WISHLIST_GET_SUCCESS,
- WISHLIST_REMOVE
-} from "./Wishlist.actionTypes"
-
-import { getWishlistAPI,removeWishlist} from "./Wishlist.api"
-
-export const wishlistGetData = () => async(dispatch) => {
- dispatch({type: WISHLIST_GET_LOADING});
- try{
- let data = await getWishlistAPI();
- dispatch({type:WISHLIST_GET_SUCCESS,payload:data})
-
- }catch(e){
- dispatch({type: WISHLIST_GET_ERROR})
- }
-}
-
-
-export const removeWishlistData = (id) => async(dispatch) => {
- let data1 = await removeWishlist(id);
- dispatch({type:WISHLIST_REMOVE,payload:id})
-}
-
-
diff --git a/minishop/src/redux/Wishlist/Wishlist.api.js b/minishop/src/redux/Wishlist/Wishlist.api.js
deleted file mode 100644
index 3f79fce..0000000
--- a/minishop/src/redux/Wishlist/Wishlist.api.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import axios from "axios";
-
-export const getWishlistAPI = async() => {
- let res = await axios.get(`https://busy-peplum-fawn.cyclic.app/wishList`);
- // console.log('res:', res.data)
- return res.data;
-}
-
-export const removeWishlist = async(id) => {
- try{
- let res = await axios.delete(`https://busy-peplum-fawn.cyclic.app/wishList/${id}`);
- return res;
- }catch(err){
- return err;
- }
-}
-
\ No newline at end of file
diff --git a/minishop/src/redux/Wishlist/Wishlist.reducer.js b/minishop/src/redux/Wishlist/Wishlist.reducer.js
deleted file mode 100644
index 8b187a2..0000000
--- a/minishop/src/redux/Wishlist/Wishlist.reducer.js
+++ /dev/null
@@ -1,49 +0,0 @@
-import {
- WISHLIST_GET_ERROR,
- WISHLIST_GET_LOADING,
- WISHLIST_GET_SUCCESS,
- WISHLIST_REMOVE
-} from "./Wishlist.actionTypes"
-
-let initialState = {
- loading:false,
- error:false,
- wishData:[],
-}
-
-export const wishReducer = (state = initialState ,{type,payload})=>{
- switch(type){
- case WISHLIST_GET_LOADING:{
- return {
- ...state,
- loading:true
- }
- }
- case WISHLIST_GET_ERROR:{
- return {
- ...state,
- loading:false,
- error:true,
- }
- }
-
- case WISHLIST_GET_SUCCESS:{
- return {
- ...state,
- loading:false,
- wishData:payload,
- }
- }
-
- case WISHLIST_REMOVE:{
- return {
- ...state,
- wishData:state.wishData.filter((wish)=> wish.id !== payload.id)
- }
- }
-
- default : {
- return state;
- }
- }
-}
\ No newline at end of file
diff --git a/minishop/src/redux/admin_auth/admin.action.type.js b/minishop/src/redux/admin_auth/admin.action.type.js
deleted file mode 100644
index 795b1f2..0000000
--- a/minishop/src/redux/admin_auth/admin.action.type.js
+++ /dev/null
@@ -1,4 +0,0 @@
-export const ADMIN_LOGIN_LOADING = 'admin/loading'
-export const ADMIN_LOGIN_FAIL = 'admin/fail'
-export const ADMIN_LOGIN_SUCCESS = 'admin/success'
-export const ADMIN_LOGOUT = 'admin/reset'
diff --git a/minishop/src/redux/admin_auth/admin.actions.js b/minishop/src/redux/admin_auth/admin.actions.js
deleted file mode 100644
index 335fbc6..0000000
--- a/minishop/src/redux/admin_auth/admin.actions.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import {ADMIN_LOGIN_LOADING,ADMIN_LOGIN_FAIL,ADMIN_LOGIN_SUCCESS,ADMIN_LOGOUT} from './admin.action.type';
-import { getAdmin } from './admin.api';
-
-export const getAdminAuth = (data)=> async(dispatch)=>{
- try{
- dispatch({type:ADMIN_LOGIN_LOADING});
- let res = await getAdmin(data)
- typeof(res)==='string'?dispatch({type:ADMIN_LOGIN_SUCCESS,payload:res}):
- dispatch({type:ADMIN_LOGIN_FAIL})
- }catch(err){
- dispatch({type:ADMIN_LOGIN_FAIL})
- }
-}
-
-export const adminLogout = ()=>async(dispatch)=>{
- dispatch({type:ADMIN_LOGOUT})
-}
\ No newline at end of file
diff --git a/minishop/src/redux/admin_auth/admin.api.js b/minishop/src/redux/admin_auth/admin.api.js
deleted file mode 100644
index 95f99a1..0000000
--- a/minishop/src/redux/admin_auth/admin.api.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import axios from 'axios'
-
-
-export const getAdmin = async (data)=>{
- try{
- let res = await axios.post("https://potent-hot-uncle.glitch.me/api/auth/login",data)
- return res.data.access_token
- }catch(err){
- return err
- }
-}
\ No newline at end of file
diff --git a/minishop/src/redux/admin_auth/admin.reducer.js b/minishop/src/redux/admin_auth/admin.reducer.js
deleted file mode 100644
index d0342bb..0000000
--- a/minishop/src/redux/admin_auth/admin.reducer.js
+++ /dev/null
@@ -1,31 +0,0 @@
-import {ADMIN_LOGIN_LOADING,ADMIN_LOGIN_FAIL,ADMIN_LOGIN_SUCCESS,ADMIN_LOGOUT} from "./admin.action.type";
-
-let tokn = localStorage.getItem("token");
-const initialState = {
- loading: false,
- error: false,
- token: tokn,
- isAuth: tokn ? true : false,
-};
-
-export const adminAuthReducer = (state = initialState, { type, payload }) => {
- switch (type) {
- case ADMIN_LOGIN_LOADING: {
- return {...state, loading:true};
- }
- case ADMIN_LOGIN_FAIL: {
- return {...state, loading:false, error:true};
- }
- case ADMIN_LOGIN_SUCCESS: {
- localStorage.setItem("token",payload)
- return {...state, loading:false, isAuth:true};
- }
- case ADMIN_LOGOUT:{
- localStorage.removeItem('token')
- return {...state, loading:false, isAuth:false}
- }
- default: {
- return state;
- }
- }
-};
diff --git a/minishop/src/redux/admin_data/admin.action.js b/minishop/src/redux/admin_data/admin.action.js
deleted file mode 100644
index 64c9461..0000000
--- a/minishop/src/redux/admin_data/admin.action.js
+++ /dev/null
@@ -1,77 +0,0 @@
-import axios from "axios";
-import { getAllProductsApi, getAllUsersApi, getProductsApi } from "./admin.api";
-import {GET_PROD_LOADING,
- GET_PROD_SUCCESS,
- GET_ALL_PROD_SUCCESS,
- GET_PROD_FAIL,
- ADD_PROD_LOADING,
- ADD_PROD_ERROR,
- ADD_PROD_SUCCESS,GET_USER_LOADING,
- GET_USER_ERROR,
- GET_USER_SUCCESS} from './admin.actoins.type'
- export const uploadImg1 =async()=>{
- let imgUrl;
- let img_address = document.getElementById('imageUpload');
- let filePath = img_address.files[0];
- let form = new FormData();
- form.append('image',filePath);
-
- let api_key = '28637f54cd49bcfaf5a6e92f18203898'
- try{
- let res = await fetch(`https://api.imgbb.com/1/upload?key=${api_key}`,{
- method:'POST',
- body:form,
- });
- let data = await res.json();
- imgUrl = data.data.display_url
- }catch(err){
- // console.log(err)
- }
- let loading = document.getElementById('image_label');
- loading.textContent = 'Select from Computer'
- let loading_img = document.getElementById('photo_vdo');
- loading_img.src='https://cdn.iconscout.com/icon/premium/png-128-thumb/photo-122-88145.png'
- let preview = document.getElementById('preview');
- preview.style.display='flex';
- document.getElementById('post_modal_box').style.display='none'
- let img = document.createElement('img');
- let img_div = document.getElementById('img_preview');
- img.setAttribute('src',imgUrl);
- img_div.append(img)
-}
-
-export const getProductsAdmin = (page)=>async(dispatch)=>{
- dispatch({type:GET_PROD_LOADING})
- try{
- let res = await getProductsApi(page)
- dispatch({type:GET_PROD_SUCCESS,payload:res})
- }catch(err){
- dispatch({type:GET_PROD_FAIL})
- }
-}
-export const getProdCatagoty = (val)=>async(dispatch)=>{
-try{
- let res = await axios.get(`https://lackadaisical-volcano-larch.glitch.me/data?Categories=${val}`)
- dispatch({type:GET_PROD_SUCCESS,payload:res.data})
-}catch(err){
- dispatch({type:GET_PROD_FAIL})
-}
-}
-export const getAllProducts = ()=>async(dispatch)=>{
-try{
- let res = await getAllProductsApi()
- dispatch({type:GET_ALL_PROD_SUCCESS,payload:res})
-}catch(err){
- dispatch({type:GET_PROD_FAIL})
-}
-}
-
-export const getAllUsers = ()=>async(dispatch)=>{
- try{
- dispatch({type:GET_USER_LOADING})
- let res = await getAllUsersApi();
- dispatch({type:GET_USER_SUCCESS,payload:res})
- }catch(err){
- dispatch({type:GET_USER_ERROR})
- }
-}
\ No newline at end of file
diff --git a/minishop/src/redux/admin_data/admin.actoins.type.js b/minishop/src/redux/admin_data/admin.actoins.type.js
deleted file mode 100644
index 490eb0a..0000000
--- a/minishop/src/redux/admin_data/admin.actoins.type.js
+++ /dev/null
@@ -1,10 +0,0 @@
-export const GET_PROD_LOADING = 'admin/products/loading'
-export const GET_PROD_SUCCESS = 'admin/products/success'
-export const GET_ALL_PROD_SUCCESS = 'admin/ALL/products/success'
-export const GET_PROD_FAIL = 'admin/products/fail'
-export const ADD_PROD_LOADING = 'admin/products/add/loading'
-export const ADD_PROD_ERROR = 'admin/products/add/error'
-export const ADD_PROD_SUCCESS = 'admin/products/add/success'
-export const GET_USER_LOADING = 'admin/users/loading'
-export const GET_USER_ERROR = 'admin/users/error'
-export const GET_USER_SUCCESS = 'admin/users/success'
\ No newline at end of file
diff --git a/minishop/src/redux/admin_data/admin.api.js b/minishop/src/redux/admin_data/admin.api.js
deleted file mode 100644
index 9d84f8c..0000000
--- a/minishop/src/redux/admin_data/admin.api.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import axios from "axios"
-
-export const getProductsApi = async(page)=>{
- try{
- const res = await axios.get(`https://lackadaisical-volcano-larch.glitch.me/data?_page=${page}&_limit=10`)
- return res.data
- }catch(err){
- console.log('error',err)
- }
-}
-export const getAllProductsApi = async()=>{
- try{
- const res = await axios.get(`https://lackadaisical-volcano-larch.glitch.me/data`)
- return res.data
- }catch(err){
- console.log('error',err)
- }
-}
-
-export const getAllUsersApi = async()=>{
- try{
- let res = await axios.get('https://lackadaisical-volcano-larch.glitch.me/user')
- return res.data
- }catch(err){
- console.log(err)
- }
-}
\ No newline at end of file
diff --git a/minishop/src/redux/admin_data/admin.reducer.js b/minishop/src/redux/admin_data/admin.reducer.js
deleted file mode 100644
index 2bedddd..0000000
--- a/minishop/src/redux/admin_data/admin.reducer.js
+++ /dev/null
@@ -1,55 +0,0 @@
-import {GET_PROD_LOADING,
- GET_PROD_SUCCESS,
- GET_ALL_PROD_SUCCESS,
- GET_PROD_FAIL,
- ADD_PROD_LOADING,
- ADD_PROD_ERROR,
- ADD_PROD_SUCCESS,GET_USER_LOADING,
- GET_USER_ERROR,
- GET_USER_SUCCESS} from './admin.actoins.type'
-
-const initState = {
- loading: false,
- error: false,
- products: [],
- allProd:[],
- allUsers:[]
-};
-
-export const adminAllData = (state = initState, { type, payload }) => {
- switch (type) {
- case GET_PROD_LOADING: {
- return { ...state,loading:true };
- }
- case GET_PROD_SUCCESS: {
- return { ...state,loading:false, products:payload };
- }
- case GET_PROD_FAIL: {
- return { ...state,error:true };
- }
- case ADD_PROD_LOADING: {
- return { ...state };
- }
- case ADD_PROD_ERROR: {
- return { ...state };
- }
- case ADD_PROD_SUCCESS: {
- return { ...state };
- }
- case GET_ALL_PROD_SUCCESS:{
- return {...state, allProd:payload }
- }
- case GET_USER_LOADING:{
- return {...state, loading:true }
- }
- case GET_USER_ERROR:{
- return {...state, error:true }
- }
- case GET_USER_SUCCESS:{
- return {...state, allUsers:payload }
- }
- default: {
- return { ...state };
- }
- }
-};
diff --git a/minishop/src/redux/store.js b/minishop/src/redux/store.js
deleted file mode 100644
index 7eaf7e1..0000000
--- a/minishop/src/redux/store.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import {
- legacy_createStore,
- compose,
- combineReducers,
- applyMiddleware
-} from 'redux'
-
-import thunk from "redux-thunk"
-
-import { cartReducer } from './Cart/Cart.reducer'
-
-import { orderReducer } from './Order/Order.reducer'
-
-import { singleReducer } from './SingleProducts/SingleProduct.reducer'
-
-import {authReducerfunc} from './Auth/auth.reducer';
- import {adminAllData} from './admin_data/admin.reducer'
-import { adminAuthReducer } from './admin_auth/admin.reducer'
-import { wishReducer } from './Wishlist/Wishlist.reducer'
-
-const rootReducer = combineReducers({
- cart:cartReducer,
- order:orderReducer,
- wishlist:wishReducer,
- singleProduct: singleReducer,
- adminAuth:adminAuthReducer,
- authUser:authReducerfunc,
- adminAll:adminAllData
-})
-
-const composeEnhancer = window._REDUX_DEVTOOLS_EXTENSION_COMPOSE_ || compose;
-
-export const store = legacy_createStore(rootReducer,composeEnhancer(applyMiddleware(thunk)))
\ No newline at end of file