From 9b571141e882a49230b1367853cb1c0cbcb55ba4 Mon Sep 17 00:00:00 2001 From: Sourabh782 Date: Wed, 30 Oct 2024 20:03:09 +0530 Subject: [PATCH] fixed code layout --- client/src/Pages/Contact.jsx | 2 +- client/src/Pages/Home.jsx | 4 +- client/src/Pages/Licensing.jsx | 20 --------- client/src/Pages/LoginPage.jsx | 2 - client/src/Pages/Newarrivals.js | 47 ---------------------- client/src/Pages/Orders.jsx | 4 -- client/src/Pages/PrivacyPolicy.jsx | 33 --------------- client/src/Pages/SignUpPage.jsx | 2 - client/src/Pages/Terms.jsx | 39 ------------------ client/src/components/Card/ProductCard.jsx | 9 +---- 10 files changed, 3 insertions(+), 159 deletions(-) diff --git a/client/src/Pages/Contact.jsx b/client/src/Pages/Contact.jsx index 9f592653..7e6b31f7 100644 --- a/client/src/Pages/Contact.jsx +++ b/client/src/Pages/Contact.jsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import Preloader from "../Components/Preloader"; import { FaLinkedin, FaGithub, FaEnvelope, FaPhoneAlt } from "react-icons/fa"; -// import "./Contact.css"; + function Contact() { const [formData, setFormData] = useState({ name: "", diff --git a/client/src/Pages/Home.jsx b/client/src/Pages/Home.jsx index 12921475..dcbb5aef 100644 --- a/client/src/Pages/Home.jsx +++ b/client/src/Pages/Home.jsx @@ -312,6 +312,4 @@ const Home = () => { ); }; -export default Home; - - +export default Home; \ No newline at end of file diff --git a/client/src/Pages/Licensing.jsx b/client/src/Pages/Licensing.jsx index 5a87390a..78f4ac96 100644 --- a/client/src/Pages/Licensing.jsx +++ b/client/src/Pages/Licensing.jsx @@ -38,24 +38,4 @@ const License = () => { ); }; -// const LicenseWrapper = styled.div` -// padding: 20px; -// max-width: 800px; -// margin: 0 auto; -// color: #333; -// line-height: 1.6; -// margin-top: 20px; - -// h1 { -// font-size: 2.5rem; -// margin-bottom: 20px; -// font-weight: bold; -// color: #002147; -// } - -// p { -// margin: 10px 0; -// } -// `; - export default License; diff --git a/client/src/Pages/LoginPage.jsx b/client/src/Pages/LoginPage.jsx index 6d51530a..965f13df 100644 --- a/client/src/Pages/LoginPage.jsx +++ b/client/src/Pages/LoginPage.jsx @@ -1,6 +1,4 @@ import React, { useState } from "react"; -// import TextField from "@mui/material/TextField"; -// import Button from "@mui/material/Button"; import IconButton from "@mui/material/IconButton"; // Import IconButton import VisibilityIcon from "@mui/icons-material/Visibility"; // Import VisibilityIcon import VisibilityOffIcon from "@mui/icons-material/VisibilityOff"; // Import VisibilityOffIcon diff --git a/client/src/Pages/Newarrivals.js b/client/src/Pages/Newarrivals.js index 3d497ac5..39b8a5da 100644 --- a/client/src/Pages/Newarrivals.js +++ b/client/src/Pages/Newarrivals.js @@ -63,53 +63,6 @@ export const books = [ ]; function Newarrivals({ onBookClick, highlightedBookId }) { - // const bookRefs = useRef({}); - - - // const fetchRandomBooks = async () => { - // setIsLoading(true); - // try { - // const randomStartIndex = Math.floor(Math.random() * 100); - // const response = await fetch(`https://www.googleapis.com/books/v1/volumes?q=subject:fiction&maxResults=7&startIndex=${randomStartIndex}`); - - // if (!response.ok) { - // throw new Error('HTTP Error! Status: ' + response.status); - // } - - // const data = await response.json(); - // console.log(data); - - - // if (data.items) { - - // const formattedBooks = data.items.map(item => ({ - // id: item.id, - // bookTitle: item.volumeInfo.title, - // authorName: item.volumeInfo.authors ? item.volumeInfo.authors[0] : 'Unknown Author', - // imageURL: item.volumeInfo.imageLinks ? item.volumeInfo.imageLinks.thumbnail : 'https://via.placeholder.com/128x193.png', - // category: item.volumeInfo.categories ? item.volumeInfo.categories[0] : 'Fiction' - // })); - // setBooks(formattedBooks); - // } - // else { - // setError('No books found'); - // } - // } - // catch (error) { - // console.error('Error fetching books: ', error); - // setError('Falied to fetch books'); - // } - // finally { - // setIsLoading(false); - // } - // }; - - // if (isLoading) { - // return
Loading...
; - // } - // if (error) { - // return
Error: {error}
; - // } return (
diff --git a/client/src/Pages/Orders.jsx b/client/src/Pages/Orders.jsx index 5fc5866d..9dc1de53 100644 --- a/client/src/Pages/Orders.jsx +++ b/client/src/Pages/Orders.jsx @@ -16,11 +16,7 @@ import { IconButton, Button, Box, - // MenuItem, - // InputLabel, } from "@mui/material"; -// import FormControl from '@mui/material/FormControl'; -// import Select, { SelectChangeEvent } from '@mui/material/Select'; import SearchIcon from "@mui/icons-material/Search"; import SortIcon from "@mui/icons-material/Sort"; import RefreshIcon from "@mui/icons-material/Refresh"; diff --git a/client/src/Pages/PrivacyPolicy.jsx b/client/src/Pages/PrivacyPolicy.jsx index fa545b8b..75f39b2c 100644 --- a/client/src/Pages/PrivacyPolicy.jsx +++ b/client/src/Pages/PrivacyPolicy.jsx @@ -50,38 +50,5 @@ const PrivacyPolicy = () => { ); }; -// const PolicyWrapper = styled.div` -// padding: 20px; -// max-width: 800px; -// margin: 0 auto; -// color: #333; -// line-height: 1.6; -// margin-top: -65px; - - -// h1 { -// font-size: 2.5rem; -// margin-bottom: 20px; -// font-weight: bold; -// color: #002147; -// } - -// h2 { -// font-size: 1.5rem; -// } - -// p { -// margin: 10px 0; -// } - -// ul { -// list-style-type: disc; -// margin-left: 20px; -// } - -// li { -// margin: 10px 0; -// } -// `; export default PrivacyPolicy; diff --git a/client/src/Pages/SignUpPage.jsx b/client/src/Pages/SignUpPage.jsx index 47737409..aaa5c535 100644 --- a/client/src/Pages/SignUpPage.jsx +++ b/client/src/Pages/SignUpPage.jsx @@ -1,7 +1,5 @@ "use client"; import React, { useState } from "react"; -// import TextField from "@mui/material/TextField"; -// import Button from "@mui/material/Button"; import { Box, Container, Grid, IconButton, Typography } from "@mui/material"; import VisibilityIcon from "@mui/icons-material/Visibility"; // Import VisibilityIcon import VisibilityOffIcon from "@mui/icons-material/VisibilityOff"; // Import VisibilityOffIcon diff --git a/client/src/Pages/Terms.jsx b/client/src/Pages/Terms.jsx index 64b72adf..b91c6ff6 100644 --- a/client/src/Pages/Terms.jsx +++ b/client/src/Pages/Terms.jsx @@ -77,44 +77,5 @@ const TermsAndConditions = () => { ); }; -// const TermsWrapper = styled.div` -// padding: 20px; -// max-width: 800px; -// margin: 0 auto; -// color: #333; -// line-height: 1.6; -// margin-top: -65px; - - -// h1 { -// font-size: 2.5rem; -// margin-bottom: 20px; -// font-weight: bold; -// color: #002147; -// } - -// h2 { -// font-size: 1.5rem; -// margin-top: 20px; -// } - -// p { -// margin: 10px 0; -// } - -// ul { -// list-style-type: disc; -// margin-left: 20px; -// } - -// li { -// margin: 10px 0; -// } - -// address { -// font-style: normal; -// line-height: 1.6; -// } -// `; export default TermsAndConditions; diff --git a/client/src/components/Card/ProductCard.jsx b/client/src/components/Card/ProductCard.jsx index 3be90c50..c53f3648 100644 --- a/client/src/components/Card/ProductCard.jsx +++ b/client/src/components/Card/ProductCard.jsx @@ -1,7 +1,5 @@ -import React,{ useEffect, useState} from 'react' +import React from 'react' import { Link, useNavigate } from "react-router-dom" -import axios from "axios" -import jwt_decode from "jwt-decode"; import './ProductCard.css' @@ -22,11 +20,6 @@ export default function ProductCard({ productdetails }) outOfStock } = productdetails - - - - - return (