Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored code : Removed unused imports #652

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/src/Pages/Contact.jsx
Original file line number Diff line number Diff line change
@@ -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: "",
Expand Down
4 changes: 1 addition & 3 deletions client/src/Pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,4 @@ const Home = () => {
);
};

export default Home;


export default Home;
20 changes: 0 additions & 20 deletions client/src/Pages/Licensing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 0 additions & 2 deletions client/src/Pages/LoginPage.jsx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
47 changes: 0 additions & 47 deletions client/src/Pages/Newarrivals.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <div>Loading...</div>;
// }
// if (error) {
// return <div>Error: {error}</div>;
// }

return (
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 p-4">
Expand Down
4 changes: 0 additions & 4 deletions client/src/Pages/Orders.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
33 changes: 0 additions & 33 deletions client/src/Pages/PrivacyPolicy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 0 additions & 2 deletions client/src/Pages/SignUpPage.jsx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
39 changes: 0 additions & 39 deletions client/src/Pages/Terms.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
9 changes: 1 addition & 8 deletions client/src/components/Card/ProductCard.jsx
Original file line number Diff line number Diff line change
@@ -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'


Expand All @@ -22,11 +20,6 @@ export default function ProductCard({ productdetails })
outOfStock
} = productdetails






return (
<Link
to={`/shop/${_id}`}
Expand Down