├── src
├── App.css
├── More.css
├── images
│ ├── patment_.png
│ ├── stripe.png
│ ├── unlock.png
│ ├── payment.svg
│ └── welcome.svg
├── axios.js
├── SvgCheck.js
├── OrderItems.css
├── Orders.css
├── StateProvider.js
├── reportWebVitals.js
├── site.webmanifest
├── index.css
├── SignIn.css
├── index.js
├── Subtotal.css
├── Cart.css
├── Payment.css
├── FloatingSocialMedia.js
├── SocialMedia.js
├── TestCart.js
├── CartItems.css
├── Reducer.js
├── Orders.js
├── socialmedia.css
├── headerr.css
├── Cart.js
├── OrderItems.js
├── Subtotal.js
├── Firstwindow.js
├── Home.css
├── TestCart.css
├── CartItems.js
├── Product.js
├── Product.css
├── App.js
├── Footer.js
├── Footer.css
├── SignIn.js
├── Payment.js
├── Header.js
├── More.js
└── Home.js
├── public
├── Components
│ └── test.jsx
├── favicon.ico
├── BookieSS.jpeg
├── favicon-16x16.png
├── favicon-32x32.png
├── apple-touch-icon.png
├── android-chrome-192x192.png
├── android-chrome-512x512.png
├── about.txt
├── manifest.json
└── index.html
├── functions
├── .gitignore
├── ui-debug.log
├── .eslintrc.js
├── index.js
└── package.json
├── ui-debug.log
├── .firebaserc
├── firebase.json
├── .gitignore
├── .github
└── workflows
│ ├── firebase-hosting-merge.yml
│ └── firebase-hosting-pull-request.yml
├── LICENSE
├── package.json
├── README.md
└── .firebase
└── hosting.YnVpbGQ.cache
/src/App.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/More.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/Components/test.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/functions/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
--------------------------------------------------------------------------------
/ui-debug.log:
--------------------------------------------------------------------------------
1 | Web / API server started at http://localhost:4000
2 |
--------------------------------------------------------------------------------
/functions/ui-debug.log:
--------------------------------------------------------------------------------
1 | Web / API server started at http://localhost:4000
2 |
--------------------------------------------------------------------------------
/.firebaserc:
--------------------------------------------------------------------------------
1 | {
2 | "projects": {
3 | "default": "clone-b8ccc"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrateekSrivastava1/Bookies/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/public/BookieSS.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrateekSrivastava1/Bookies/HEAD/public/BookieSS.jpeg
--------------------------------------------------------------------------------
/src/images/patment_.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrateekSrivastava1/Bookies/HEAD/src/images/patment_.png
--------------------------------------------------------------------------------
/src/images/stripe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrateekSrivastava1/Bookies/HEAD/src/images/stripe.png
--------------------------------------------------------------------------------
/src/images/unlock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrateekSrivastava1/Bookies/HEAD/src/images/unlock.png
--------------------------------------------------------------------------------
/public/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrateekSrivastava1/Bookies/HEAD/public/favicon-16x16.png
--------------------------------------------------------------------------------
/public/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrateekSrivastava1/Bookies/HEAD/public/favicon-32x32.png
--------------------------------------------------------------------------------
/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrateekSrivastava1/Bookies/HEAD/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/public/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrateekSrivastava1/Bookies/HEAD/public/android-chrome-192x192.png
--------------------------------------------------------------------------------
/public/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrateekSrivastava1/Bookies/HEAD/public/android-chrome-512x512.png
--------------------------------------------------------------------------------
/src/axios.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | const instance = axios.create({
4 | baseURL: `https:${process.env.REACT_APP_BASE_URL}`
5 | });
6 | export default instance;
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/SvgCheck.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Firstwindow from "./Firstwindow";
3 | export default function SvgCheck() {
4 | return (
5 |
6 |
7 |
8 | );
9 | }
10 |
--------------------------------------------------------------------------------
/functions/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | es6: true,
5 | node: true,
6 | },
7 | extends: [
8 | "eslint:recommended",
9 | "google",
10 | ],
11 | rules: {
12 | quotes: ["error", "double"],
13 | },
14 | };
15 |
--------------------------------------------------------------------------------
/src/OrderItems.css:
--------------------------------------------------------------------------------
1 | .orders {
2 | padding: 40px;
3 | margin: 20px;
4 | border: 1px solid lightgray;
5 | background-color: white;
6 | position: relative;
7 | }
8 | .orderId {
9 | position: absolute;
10 | top: 40px;
11 | right: 20px;
12 | }
13 | .orderTotal{
14 | font-weight: 500;
15 | text-align: right;
16 | }
--------------------------------------------------------------------------------
/src/Orders.css:
--------------------------------------------------------------------------------
1 | .orders_box{
2 | margin-top: 60px;
3 | padding: 20px 80px;
4 | background-color: rgba(237, 239, 241, 0.534);;
5 | border-bottom: 1px solid lightgray;
6 | box-shadow: 0 4px 8px 0 rgba(84, 147, 184, 0.2),
7 | 0 6px 20px 0 rgba(84, 147, 184, 0.2);
8 | }
9 | .orders_box > h1{
10 | margin: 30px 17px;
11 | /* text-decoration:underline; */
12 | }
--------------------------------------------------------------------------------
/src/StateProvider.js:
--------------------------------------------------------------------------------
1 | import React, { createContext, useContext, useReducer } from "react";
2 | export const StateContext = createContext();
3 | export const StateProvider = ({ reducer, initialState, children }) => (
4 |
5 | {children}
6 |
7 | );
8 |
9 | export const useStateValue = () => useContext(StateContext);
--------------------------------------------------------------------------------
/public/about.txt:
--------------------------------------------------------------------------------
1 | This favicon was generated using the following graphics from Twitter Twemoji:
2 |
3 | - Graphics Title: 1f4da.svg
4 | - Graphics Author: Copyright 2020 Twitter, Inc and other contributors (https://github.com/twitter/twemoji)
5 | - Graphics Source: https://github.com/twitter/twemoji/blob/master/assets/svg/1f4da.svg
6 | - Graphics License: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
7 |
--------------------------------------------------------------------------------
/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/src/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "",
3 | "short_name": "",
4 | "icons": [
5 | {
6 | "src": "/android-chrome-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "/android-chrome-512x512.png",
12 | "sizes": "512x512",
13 | "type": "image/png"
14 | }
15 | ],
16 | "theme_color": "#ffffff",
17 | "background_color": "#ffffff",
18 | "display": "standalone"
19 | }
20 |
--------------------------------------------------------------------------------
/firebase.json:
--------------------------------------------------------------------------------
1 | {
2 | "hosting": {
3 | "public": "build",
4 | "ignore": [
5 | "firebase.json",
6 | "**/.*",
7 | "**/node_modules/**"
8 | ],
9 | "rewrites": [
10 | {
11 | "source": "**",
12 | "destination": "/index.html"
13 | }
14 | ]
15 | },
16 | "functions": {
17 | "predeploy": [
18 | "npm --prefix \"%$RESOURCE_DIR%\" run lint"
19 | ],
20 | "source": "functions"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | *{
2 | margin: 0;
3 | }
4 |
5 | body {
6 | margin: 0;
7 | background-color: rgb(255, 255, 255);
8 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
9 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
10 | sans-serif;
11 | -webkit-font-smoothing: antialiased;
12 | -moz-osx-font-smoothing: grayscale;
13 | }
14 |
15 | code {
16 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
17 | monospace;
18 | }
19 |
--------------------------------------------------------------------------------
/src/SignIn.css:
--------------------------------------------------------------------------------
1 | *{
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 |
6 | }
7 | .body{
8 | padding-top: 100px;
9 | }
10 | .cont{
11 | padding: 10px;
12 | border-radius: 15px;
13 | box-shadow: 0 4px 8px 0 rgba(84, 147, 184, 0.5),
14 | 0 6px 20px 0 rgba(84, 147, 184, 0.6);
15 | width: 100%;
16 | }
17 | .image{
18 | /* width: 530px; */
19 | width: 100%;
20 | object-fit: cover;
21 | }
22 | .row{
23 | /* background: white; */
24 | border-radius: 10px;
25 | }
26 | .btt{
27 | margin-left: 10px;
28 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | #components
9 | src/Card.js
10 | src/Nav.css
11 | src/Nav.js
12 | src/card.css
13 | src/firebase.js
14 |
15 | # testing
16 | /coverage
17 |
18 | # production
19 | /build
20 |
21 | # misc
22 | .DS_Store
23 | .env.local
24 | .env.development.local
25 | .env.test.local
26 | .env.production.local
27 | .env
28 |
29 | npm-debug.log*
30 | yarn-debug.log*
31 | yarn-error.log*
32 |
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/.github/workflows/firebase-hosting-merge.yml:
--------------------------------------------------------------------------------
1 | # This file was auto-generated by the Firebase CLI
2 | # https://github.com/firebase/firebase-tools
3 |
4 | name: Deploy to Firebase Hosting on merge
5 | 'on':
6 | push:
7 | branches:
8 | - main
9 | jobs:
10 | build_and_deploy:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: actions/checkout@v2
14 | - run: npm run build
15 | - uses: FirebaseExtended/action-hosting-deploy@v0
16 | with:
17 | repoToken: '${{ secrets.GITHUB_TOKEN }}'
18 | firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CLONE_B8CCC }}'
19 | channelId: live
20 | projectId: clone-b8ccc
21 |
--------------------------------------------------------------------------------
/.github/workflows/firebase-hosting-pull-request.yml:
--------------------------------------------------------------------------------
1 | # This file was auto-generated by the Firebase CLI
2 | # https://github.com/firebase/firebase-tools
3 |
4 | name: Deploy to Firebase Hosting on PR
5 | 'on': pull_request
6 | jobs:
7 | build_and_preview:
8 | if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v2
12 | - run: npm run build
13 | - uses: FirebaseExtended/action-hosting-deploy@v0
14 | with:
15 | repoToken: '${{ secrets.GITHUB_TOKEN }}'
16 | firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CLONE_B8CCC }}'
17 | projectId: clone-b8ccc
18 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom";
3 | import "./index.css";
4 | import App from "./App";
5 | import reportWebVitals from "./reportWebVitals";
6 | import { StateProvider } from "./StateProvider";
7 | import Reducer, {initialState} from "./Reducer";
8 | import { loadStripe } from "@stripe/stripe-js";
9 | import '@fortawesome/fontawesome-free/css/all.min.css';
10 | import 'bootstrap-css-only/css/bootstrap.min.css';
11 | import 'mdbreact/dist/css/mdb.css';
12 | ReactDOM.render(
13 |
14 |
15 |
16 |
17 |
18 | ,
19 | document.getElementById("root")
20 | );
21 |
22 | reportWebVitals();
23 |
--------------------------------------------------------------------------------
/src/Subtotal.css:
--------------------------------------------------------------------------------
1 | .subtotal {
2 | display: flex;
3 | flex-direction: column;
4 | flex-wrap: wrap;
5 | /* align-items:flex-start ; */
6 | align-items: center;
7 | justify-content: space-between;
8 | width: 300px;
9 | height: 100px;
10 | background-color: white;
11 | margin-top: 50px;
12 | border-radius: 3px;
13 | padding: 1px 0 10px 0;
14 | margin-bottom: 20x;
15 | }
16 | .subtotal > a button {
17 | background: rgba(255, 255, 255, 0);
18 | border-radius: 15px;
19 | height: 30px;
20 | /* padding-left: 10px; */
21 | width: 100%;
22 | border: 1px rgb(28, 100, 209) solid;
23 | margin-top: 10px;
24 | color: black;
25 | }
26 | .subtotal > a > button:hover {
27 | background-color: rgb(28, 100, 209);
28 | cursor: pointer;
29 | color: white
30 | }
--------------------------------------------------------------------------------
/functions/index.js:
--------------------------------------------------------------------------------
1 | const functions = require("firebase-functions");
2 | const express = require("express");
3 | const cors = require("cors");
4 | const stripe = require("stripe")(
5 | "sk_test_51J2xnJSF9T1v6nUZ7gVuy3JqYPfwO1xBBLv4airaJOSazfAu3Zsyde2ad3xTO48mPlFAIjTkejeLXcHazMNWrqg300Yvi6JFua"
6 | );
7 |
8 | const app = express();
9 | app.use(cors({ origin: true }));
10 | app.use(express.json());
11 | app.get("/", (req, res) => res.status(200).send("perfect"));
12 |
13 | app.post("/payments/create", async (req, res) => {
14 | const total = req.query.total;
15 | const paymentIntent = await stripe.paymentIntents.create({
16 | amount: total,
17 | currency: "INR",
18 | });
19 | res.status(201).send({
20 | userSecret: paymentIntent.client_secret,
21 | });
22 | });
23 |
24 | exports.api = functions.https.onRequest(app);
25 |
--------------------------------------------------------------------------------
/functions/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "functions",
3 | "description": "Cloud Functions for Firebase",
4 | "scripts": {
5 | "lint": "eslint .",
6 | "serve": "firebase emulators:start --only functions",
7 | "shell": "firebase functions:shell",
8 | "start": "npm run shell",
9 | "deploy": "firebase deploy --only functions",
10 | "logs": "firebase functions:log"
11 | },
12 | "engines": {
13 | "node": "14"
14 | },
15 | "main": "index.js",
16 | "dependencies": {
17 | "cors": "^2.8.5",
18 | "express": "^4.17.1",
19 | "firebase-admin": "^9.8.0",
20 | "firebase-functions": "^3.14.1",
21 | "stripe": "^8.154.0"
22 | },
23 | "devDependencies": {
24 | "eslint": "^7.6.0",
25 | "eslint-config-google": "^0.14.0",
26 | "firebase-functions-test": "^0.2.0"
27 | },
28 | "private": true
29 | }
30 |
--------------------------------------------------------------------------------
/src/Cart.css:
--------------------------------------------------------------------------------
1 |
2 | .cartPage {
3 | padding: 30px;
4 | margin: 80px auto;
5 | box-sizing: border-box;
6 | display: flex;
7 | flex-direction: column;
8 | align-items: center;
9 | justify-content: space-between;
10 | /* background-color: #ff523b; */
11 | }
12 |
13 | table {
14 | width: 100%;
15 | border-collapse: collapse;
16 | border-radius: 10px;
17 | }
18 | th {
19 | display: flex;
20 | flex-direction: column;
21 | width: 100%;
22 | text-align: left;
23 | padding-right: 10px;
24 | padding: 5px;
25 | color: #fff;
26 | background: #3b90ff;
27 | font-weight: normal;
28 | /* border-radius: 10px; */
29 | /* border-top: 10px; */
30 | }
31 | .totalPrice table{
32 | /* border-top: 3px solid #3b90ff; */
33 | width: 100%;
34 | max-width: 510px;
35 | }
36 | th:last-child {
37 | padding-right: 40px;
38 | text-align: right;
39 | }
40 | tr{
41 | border-top-left-radius: 10px;
42 | }
43 |
--------------------------------------------------------------------------------
/src/Payment.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 | .body {
7 | padding-top: 100px;
8 | }
9 | .cont {
10 | padding: 10px;
11 | border-radius: 15px;
12 | box-shadow: 0 4px 8px 0 rgba(84, 147, 184, 0.5),
13 | 0 6px 20px 0 rgba(84, 147, 184, 0.6);
14 | width: 100%;
15 | }
16 | .image {
17 | /* width: 530px; */
18 | width: 100%;
19 | object-fit: cover;
20 | }
21 | .row {
22 | /* background: white; */
23 | border-radius: 10px;
24 | }
25 | .bt {
26 | width: 100%;
27 | }
28 | @media screen and (max-width: 700px) {
29 | .mail {
30 | height: 25px;
31 | width: 150px;
32 | font-size: 1.2rem;
33 | overflow-x: scroll;
34 | margin-bottom: 15px;
35 | }
36 | .price {
37 | height: 25px;
38 | width: 300px;
39 | font-size: 1.2rem;
40 | overflow-y: scroll;
41 | /* padding-top: 25px; */
42 | }
43 | .form-row{
44 | padding: 5px;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/FloatingSocialMedia.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import "./socialmedia.css";
3 | function FloatingSocialMedia() {
4 | return (
5 |
24 | );
25 | }
26 |
27 | export default FloatingSocialMedia;
28 |
--------------------------------------------------------------------------------
/src/SocialMedia.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import "./socialmedia.css";
3 | function SocialMedia() {
4 | return (
5 |
6 |
25 |
Let's Connect.
26 |
27 | );
28 | }
29 |
30 | export default SocialMedia;
31 |
--------------------------------------------------------------------------------
/src/TestCart.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import "./TestCart.css";
3 | import { useStateValue } from "./StateProvider";
4 | function TestCart({ key, id, title, image, price, rating }) {
5 |
6 | const [{cart}, setCart] = useStateValue();
7 |
8 | const deleteItem = () => {
9 | setCart({
10 | type: "REMOVE_FROM_CART",
11 | id: id,
12 | })
13 | }
14 | return (
15 |
16 |

17 |
18 |
{title}
19 |
20 | ₹
21 | {price}
22 |
23 |
24 | {Array(rating)
25 | .fill()
26 | .map((_, i) => (
27 |
⭐
28 | ))}
29 |
30 |
31 |
32 |
33 | );
34 | }
35 |
36 | export default TestCart;
37 |
--------------------------------------------------------------------------------
/src/CartItems.css:
--------------------------------------------------------------------------------
1 | .cartItems {
2 | display: flex;
3 | margin-top: 20px;
4 | margin-left: 10px;
5 | margin-bottom: 20px;
6 | border-bottom: 1px solid lightgray;
7 | padding-bottom: 10px;
8 | }
9 | .cartProduct_description {
10 | padding-left: 20px;
11 | max-width: 500px;
12 | }
13 | .cartProduct_description > button {
14 | height: 30px;
15 | width: 200px;
16 | background-color: orange;
17 | border: 1px rgb(202, 152, 60) solid;
18 | margin-top: 10px;
19 | color: black;
20 | border-radius: 10px;
21 | }
22 |
23 | .cartProduct_description > button:hover {
24 | background-color: rgb(209, 146, 28);
25 | cursor: pointer;
26 | }
27 |
28 | .cartProduct_image {
29 | object-fit: contain;
30 | width: 180px;
31 | height: 180px;
32 | }
33 | .cartProduct_rating {
34 | display: flex;
35 | }
36 | .cartProduct_title {
37 | font-size: 17px;
38 | font-weight: 700;
39 | }
40 | @media screen and (max-width: 700px) {
41 | .cartProduct_title {
42 | font-size: 13px;
43 | }
44 | .cartProduct_description {
45 | font-size: 14px;
46 | }
47 | }
48 | .cartProduct_price {
49 | float: right;
50 | }
51 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Prateek Srivastava
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/src/Reducer.js:
--------------------------------------------------------------------------------
1 | import CartItems from "./CartItems";
2 |
3 | export const initialState = {
4 | cart: [],
5 | user: null
6 | };
7 |
8 | export const getTotalAmount = (cart) =>
9 | cart?.reduce((amount, item) => item.price + amount, 0);
10 |
11 | const Reducer = (state, action) => {
12 | // console.log(action);
13 | switch (action.type) {
14 | case "ADD_TO_CART":
15 | return {
16 | ...state,
17 | cart: [...state.cart, action.item],
18 | };
19 | case "REMOVE_FROM_CART":
20 | const i = state.cart.findIndex((CartItems) => CartItems.id === action.id);
21 | let newCart = [...state.cart];
22 | if (i >= 0) {
23 | newCart.splice(i, 1);
24 | } else {
25 | console.warn(`Can't remove it, this item is not present in the cart`);
26 | }
27 | return {
28 | ...state,
29 | cart: newCart
30 | }
31 | case "SET_USER":
32 | return {
33 | ...state,
34 | user: action.user
35 | }
36 | case "EMPTY_CART":
37 | return{
38 | ...state,
39 | cart: []
40 | }
41 | default:
42 | return state;
43 | }
44 | };
45 |
46 | export default Reducer;
47 |
--------------------------------------------------------------------------------
/src/Orders.js:
--------------------------------------------------------------------------------
1 | import "./Orders.css";
2 | import React from "react";
3 | import { useState } from "react";
4 | import { useEffect } from "react";
5 | import { db } from "./firebase";
6 | import Footer from "./Footer";
7 |
8 | import { useStateValue } from "./StateProvider";
9 | import OrderItems from "./OrderItems";
10 | function Orders() {
11 | const [order, setOrder] = useState([]);
12 | const [{ cart, user }, setCart] = useStateValue();
13 | useEffect(() => {
14 | if (user) {
15 | db.collection("Customer")
16 | .doc(user?.uid)
17 | .collection("orders")
18 | .orderBy("created", "desc")
19 | .onSnapshot((snapshot) =>
20 | setOrder(
21 | snapshot.docs.map((doc) => ({
22 | id: doc.id,
23 | data: doc.data(),
24 | }))
25 | )
26 | );
27 | } else {
28 | setOrder([]);
29 | }
30 | }, [user]);
31 |
32 | return (
33 | <>
34 |
35 |
Your Orders:
36 |
37 | {order?.map((order) => (
38 |
39 | ))}
40 |
41 |
42 |
43 | >
44 | );
45 | }
46 |
47 | export default Orders;
48 |
--------------------------------------------------------------------------------
/src/socialmedia.css:
--------------------------------------------------------------------------------
1 | .body strong {
2 | /* text-align: center; */
3 | padding-left: 46px;
4 | justify-content: center;
5 | }
6 | .social-icons a {
7 | width: 30px;
8 | height: 0px;
9 | display: flex;
10 | justify-content: center;
11 | align-items: center;
12 | margin: 20px 10px;
13 | border-radius: 50%;
14 | font-size: 30px;
15 | }
16 | .social-icons {
17 | display: flex;
18 | }
19 | .social-icons i {
20 | color: #1164ff;
21 | }
22 | .social-icons a:hover {
23 | background-color: #000000;
24 | box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
25 | transition: all ease 0.5s;
26 | }
27 |
28 | .social-icons a:hover i,
29 | .a-social-icons a:hover i {
30 | /* background-color: #000000; */
31 | color: rgb(0, 0, 0);
32 | transition: all ease 0.5s;
33 | }
34 | .a-social-icons {
35 | position: fixed;
36 | top: 30%;
37 | right: -20px;
38 | z-index: 10;
39 | transform: translateX(-50%);
40 | }
41 | .a-social-icons a {
42 | display: flex;
43 | justify-content: center;
44 | align-items: center;
45 | width: 50px;
46 | height: 50px;
47 | padding: 0px;
48 | margin: 0px;
49 | line-height: 0px;
50 | background-color: #ffffff;
51 | border: 1px solid #cbcbcb;
52 | box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
53 | }
54 | .a-social-icons i {
55 | color: #1164ff;
56 | font-size: 20px;
57 | }
58 | @media screen and (max-width: 700px) {
59 | .a-social-icons {
60 | top: 50%;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/headerr.css:
--------------------------------------------------------------------------------
1 | /* @import url('https://fonts.googleapis.com/css2?family=PT+Sans+Narrow&display=swap'); */
2 |
3 | *{
4 | margin: 0;
5 | padding: 0;
6 | box-sizing: border-box;
7 | font-family: 'PT Sans Narrow', sans-serif;
8 | text-decoration: none;
9 | }
10 |
11 | .navbar {
12 | background-color: #fff;
13 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.2);
14 | }
15 |
16 | .navbar-brand{
17 | font-size: 2.25rem;
18 | color: #0656eb !important;;
19 | }
20 |
21 | .navbar a{
22 | font-size: 1rem;
23 | text-transform: capitalize;
24 | text-decoration: none;
25 | }
26 |
27 | .bb{
28 | /* font-size: 35px !important; */
29 | font-size:2.25rem;
30 | }
31 |
32 | .menu_active{
33 | font-weight: bold;
34 | border-bottom: 1px solid #483ff8;
35 | }
36 |
37 | .navbar a:hover{
38 | color: #3498db;
39 | }
40 |
41 | #header{
42 | width: 100%;
43 | height: 80%;
44 | margin-top: 70px;
45 | }
46 |
47 | #header h1{
48 | margin: 0, 0, 10px, 0;
49 | font-size: 48px;
50 | font-weight: 700;
51 | color: black;
52 | }
53 |
54 | li{
55 | padding-right: 20px;
56 | }
57 | .btn{
58 | border-radius: 50px;
59 | text-decoration: none;
60 | }
61 |
62 | @media (max-width: 991px) {
63 | .navbar-brand{
64 | font-size: 1.5rem;
65 | }
66 | .menu_active{
67 | font-weight: bold;
68 | border-bottom: none;
69 | }
70 | }
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
14 |
15 | Bookies
16 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/Cart.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import "./Cart.css";
3 | import { useStateValue } from "./StateProvider";
4 | import Subtotal from "./Subtotal";
5 | import CartItems from "./CartItems";
6 | import SocialMedia from "./SocialMedia";
7 | import Footer from "./Footer";
8 | import FloatingSocialMedia from "./FloatingSocialMedia";
9 |
10 | function Cart() {
11 | const [{ cart, user }, setCart] = useStateValue();
12 |
13 | return (
14 | <>
15 |
16 |
17 |
18 | | Product |
19 | Subtotal |
20 |
21 |
22 |
23 | {/*
Shopping Cart
*/}
24 | {cart.map((item) => (
25 |
33 | ))}
34 |
35 |
36 |
37 |
44 |
45 |
46 |
47 | >
48 | );
49 | }
50 |
51 | export default Cart;
52 |
--------------------------------------------------------------------------------
/src/OrderItems.js:
--------------------------------------------------------------------------------
1 | import moment from "moment";
2 | import React from "react";
3 | import { useStateValue } from "./StateProvider";
4 | import CartItems from "./CartItems";
5 | import CurrencyFormat from "react-currency-format";
6 | import "./OrderItems.css";
7 | import { getTotalAmount } from "./Reducer";
8 |
9 | function OrderItems({ order }) {
10 | const [{ cart }, setCart] = useStateValue();
11 |
12 | return (
13 |
14 |
Orders
15 |
{moment.unix(order.data.created).format("Do MMMM YYYY, h:ma")}
16 |
17 | Order ID:
18 | {order.id}
19 |
20 | {order.data.cart?.map((item) => (
21 |
30 | ))}
31 |
32 |
33 | (
35 |
36 | Total Cost: {value}
37 |
38 | )}
39 | decimalScale={2}
40 | value={order.data.amount / 100}
41 | displayType={"text"}
42 | thousandSeparator={true}
43 | prefix={"₹"}
44 | />
45 |
46 |
47 | );
48 | }
49 |
50 | export default OrderItems;
51 |
--------------------------------------------------------------------------------
/src/Subtotal.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import "./Subtotal.css";
3 | import CurrencyFormat from "react-currency-format";
4 | import { useStateValue } from "./StateProvider";
5 | import { getTotalAmount } from "./Reducer";
6 | import { useHistory } from "react-router-dom";
7 | import { Link } from "react-router-dom";
8 | import Button from "@material-ui/core/Button";
9 | function Subtotal() {
10 | const history = useHistory();
11 | // const [{ cart }, setCart] = useStateValue();
12 | const [{ cart, user }, setCart] = useStateValue();
13 |
14 | return (
15 |
16 | (
18 | <>
19 |
20 | Subtotal ({cart.length} items): {value}
21 |
22 | >
23 | )}
24 | decimalScale={2}
25 | value={getTotalAmount(cart)}
26 | displayType={"text"}
27 | thousandSeparator={true}
28 | prefix={"₹"}
29 | />
30 | {/* */}
31 |
32 |
33 | {/* */}
34 |
41 |
42 |
43 | );
44 | }
45 |
46 | export default Subtotal;
47 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bookies",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@fortawesome/fontawesome-svg-core": "^1.2.35",
7 | "@glidejs/glide": "^3.4.1",
8 | "@material-ui/core": "^4.11.4",
9 | "@material-ui/icons": "^4.11.2",
10 | "@stripe/react-stripe-js": "^1.4.1",
11 | "@stripe/stripe-js": "^1.15.0",
12 | "@testing-library/jest-dom": "^5.13.0",
13 | "@testing-library/react": "^11.2.7",
14 | "@testing-library/user-event": "^12.8.3",
15 | "axios": "^0.21.1",
16 | "bootstrap": "^5.0.0-beta3",
17 | "firebase": "^8.6.7",
18 | "lottie-web": "^5.7.11",
19 | "mdbreact": "^5.0.2",
20 | "moment": "^2.29.1",
21 | "react": "^17.0.2",
22 | "react-bootstrap": "^1.6.1",
23 | "react-currency-format": "^1.0.0",
24 | "react-dom": "^17.0.2",
25 | "react-elastic-carousel": "^0.11.5",
26 | "react-router-dom": "^5.2.0",
27 | "react-scripts": "4.0.3",
28 | "styled-components": "^5.3.0",
29 | "web-vitals": "^1.1.2"
30 | },
31 | "scripts": {
32 | "start": "react-scripts start",
33 | "build": "react-scripts build",
34 | "test": "react-scripts test",
35 | "eject": "react-scripts eject"
36 | },
37 | "eslintConfig": {
38 | "extends": [
39 | "react-app",
40 | "react-app/jest"
41 | ]
42 | },
43 | "browserslist": {
44 | "production": [
45 | ">0.2%",
46 | "not dead",
47 | "not op_mini all"
48 | ],
49 | "development": [
50 | "last 1 chrome version",
51 | "last 1 firefox version",
52 | "last 1 safari version"
53 | ]
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/Firstwindow.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useRef } from "react";
2 | import lottie from "lottie-web";
3 | import { NavLink } from "react-router-dom";
4 | const Firstwindow = () => {
5 | const container = useRef(null);
6 |
7 | useEffect(() => {
8 | lottie.loadAnimation({
9 | container: container.current,
10 | renderer: "svg",
11 | loop: true,
12 | autoplay: true,
13 | animationData: require("./images/coder-home.json"),
14 | });
15 | }, []);
16 |
17 | return (
18 | <>
19 |
42 | >
43 | );
44 | };
45 |
46 | export default Firstwindow;
47 |
--------------------------------------------------------------------------------
/src/Home.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | }
5 | .more{
6 | padding-top: 30px;
7 | }
8 | .home {
9 | margin-top: 25px;
10 | display: flex;
11 | text-decoration: none;
12 | flex-direction: column;
13 | justify-content: center;
14 | margin-left: auto;
15 | margin-right: auto;
16 | z-index: 10;
17 | background-color: rgb(234, 235, 236);
18 | /* max-width: 1500px; */
19 | -moz-box-shadow: 3px 3px 5px 6px rgb(234, 235, 236);
20 | -webkit-box-shadow: 3px 3px 5px 6px rgb(234, 235, 236);
21 | box-shadow: 3px 3px 5px 6px rgb(234, 235, 236);
22 | }
23 | .mr{
24 | text-align: center;
25 | /* float:right; */
26 | /* align-items: center; */
27 | /* justify-content: center; */
28 | /* padding-left: 50px; */
29 | }
30 | .home input[type="submit"] {
31 | height: 42px;
32 | width: 200px;
33 | font-size: 18px;
34 | /* justify-content: center; */
35 | color: #ffffff;
36 | background: #0888ff;
37 | outline: none;
38 | border-radius: 10px;
39 | letter-spacing: 1px;
40 | cursor: pointer;
41 | margin-top: 12px;
42 | border: 2px solid #0669eb;
43 | transition: all 0.3s ease-in-out;
44 | }
45 | .home input[type="submit"]:hover {
46 | background: #ffffff;
47 | color: #000000;
48 | }
49 | .home_row {
50 | display: flex;
51 | /* background-color: #2f9083; */
52 | z-index: 1;
53 | margin-left: 5px;
54 | margin-right: 5px;
55 | padding: 20px;
56 | justify-content: center;
57 | }
58 | /* .slide{
59 | z-index: 10;
60 | } */
61 | .zoomImg {
62 | z-index: 10;
63 |
64 | }
65 |
66 | @media screen and (max-width: 700px) {
67 | .home_row {
68 | flex: 0 1 34rem;
69 | flex-wrap: wrap;
70 | }
71 | }
72 | .home_image {
73 | width: 100%;
74 | z-index: -1;
75 | margin-bottom: -150;
76 | mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
77 | }
78 |
--------------------------------------------------------------------------------
/src/TestCart.css:
--------------------------------------------------------------------------------
1 | .cartPage {
2 | /* margin: 60px auto; */
3 | /* background-color: #ff523b; */
4 | box-sizing: border-box;
5 | display: flex;
6 | flex: 1 2 200px;
7 | align-items: center;
8 | /* justify-content: space-between; */
9 | justify-content: center;
10 | padding: 0;
11 | margin: 0;
12 | border-bottom: 1px solid lightgrey;
13 | flex-direction: column;
14 | flex-wrap: wrap;
15 | }
16 | .cart-info {
17 | display: flex;
18 | flex-wrap: wrap;
19 | }
20 | table {
21 | width: 100%;
22 | border-collapse: collapse;
23 | }
24 | .cart-info {
25 | display: flex;
26 | flex-wrap: wrap;
27 | }
28 | th {
29 | text-align: left;
30 | padding: 5px;
31 | color: #fff;
32 | background: #3b90ff;
33 | font-weight: normal;
34 | }
35 | td {
36 | padding: 5px 0px;
37 | }
38 | .title {
39 | /* font-size: large; */
40 | font-size: 20px;
41 | display: flex;
42 | flex-wrap: wrap;
43 | }
44 | td img {
45 | display: flex;
46 | flex-wrap: wrap;
47 | width: 250px;
48 | height: 200px;
49 | margin-right: 10px;
50 | /* margin-left: 50px; */
51 | object-fit: contain;
52 | }
53 | .totalPrice {
54 | display: flex;
55 | justify-content: flex-end;
56 | }
57 |
58 | td:last-child {
59 | text-align: right;
60 | padding-right: 40px;
61 | }
62 | th:last-child {
63 | padding-right: 40px;
64 | text-align: right;
65 | }
66 | .cartProduct_rating {
67 | display: flex;
68 | flex-wrap: wrap;
69 | }
70 | .delete:hover {
71 | color: #fb1d00;
72 | }
73 | @media screen and (max-width: 700px) {
74 | td strong {
75 | font-size: 14px;
76 | }
77 | td img {
78 | width: 150px;
79 | height: 120px;
80 | }
81 | }
82 | @media screen and (max-width: 600px) {
83 | .cartProduct_rating{
84 | display: none;
85 | }
86 |
87 | }
88 | @media screen and (max-width: 450px) {
89 | td img {
90 | width: 150px;
91 | height: 120px;
92 | margin-right: 0px;
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/src/CartItems.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | // import "./CartItems.css";
3 | import Subtotal from "./Subtotal";
4 | import IconButton from "@material-ui/core/IconButton";
5 | import DeleteTwoToneIcon from "@material-ui/icons/DeleteTwoTone";
6 | import "./TestCart.css";
7 | import { useStateValue } from "./StateProvider";
8 | function CartItems({ key, id, title, image, price, rating, hideButton }) {
9 | const [{ cart }, setCart] = useStateValue();
10 |
11 | const deleteItem = () => {
12 | setCart({
13 | type: "REMOVE_FROM_CART",
14 | id: id,
15 | });
16 | };
17 | return (
18 | <>
19 |
20 |
21 |
22 |
23 |
24 | 
25 |
26 | {title}
27 |
28 | {Array(rating)
29 | .fill()
30 | .map((_, i) => (
31 | ⭐
32 | ))}
33 |
34 |
35 | {!hideButton &&
40 |
41 | }
42 |
43 |
44 | |
45 | {/*
46 |
47 | | */}
48 |
49 | ₹
50 | {price}
51 | |
52 |
53 |
54 |
55 |
56 |
57 | {/* | Subtotal |
58 | Rs 5050505 | */}
59 | {/* */}
60 |
61 |
62 |
63 |
64 | >
65 | );
66 | }
67 |
68 | export default CartItems;
69 |
--------------------------------------------------------------------------------
/src/Product.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import "./Product.css";
3 | // import { useState } from "react";
4 | import { makeStyles } from "@material-ui/core/styles";
5 | import GetAppIcon from "@material-ui/icons/GetApp";
6 | import IconButton from "@material-ui/core/IconButton";
7 | import AddShoppingCartSharpIcon from "@material-ui/icons/AddShoppingCartSharp";
8 | import { useStateValue } from "./StateProvider";
9 | function Product({
10 | download,
11 | key,
12 | id,
13 | title,
14 | image,
15 | price,
16 | rating,
17 | hideButton,
18 | hideStars,
19 | }) {
20 | const [{ cart }, setCart] = useStateValue();
21 | const addToCart = () => {
22 | setCart({
23 | type: "ADD_TO_CART",
24 | item: {
25 | key: id,
26 | id: id,
27 | title: title,
28 | image: image,
29 | price: price,
30 | rating: rating,
31 | },
32 | });
33 | };
34 |
35 | return (
36 | <>
37 |
38 |
39 |
{title}
40 |
41 | ₹
42 | {price}
43 |
44 | {!hideStars && (
45 |
46 | {Array(rating)
47 | .fill()
48 | .map((_, i) => (
49 |
⭐
50 | ))}
51 |
52 | )}
53 |
54 |

55 |
56 |
57 | {!hideButton ? (
58 |
59 |
64 |
65 | ) : (
66 |
73 |
74 |
75 | )}
76 |
77 |
78 |
79 | >
80 | );
81 | }
82 |
83 | export default Product;
84 |
--------------------------------------------------------------------------------
/src/Product.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | transition: all 0.4s cubic-bezier(0, 1.57, 0.67, 1.18);
5 | }
6 |
7 | .product {
8 | display: flex;
9 | flex-direction: column;
10 | flex-wrap: wrap;
11 | flex: 1 2 200px;
12 | transition: transform 0.5s;
13 | align-items: center;
14 | justify-content: space-between;
15 | margin: 10px;
16 | padding: 20px;
17 | width: 100%;
18 | max-height: 550px;
19 | font-size: 18px;
20 | box-sizing: border-box;
21 | border-radius: 25px;
22 | background-color: rgb(255, 255, 255);
23 | z-index: 1;
24 | box-shadow: 0 4px 8px 0 rgba(84, 147, 184, 0.2),
25 | 0 6px 20px 0 rgba(84, 147, 184, 0.2);
26 | }
27 | .product:hover {
28 | box-shadow: 0 4px 8px 0 rgba(84, 147, 184, 0.5),
29 | 0 6px 20px 0 rgba(84, 147, 184, 0.6);
30 | }
31 |
32 | .product_rating {
33 | display: flex;
34 | }
35 | .product:hover {
36 | -ms-transform: scale(1.1);
37 | -webkit-transform: scale(1.1);
38 | transform: scale(1.1);
39 | z-index: 10;
40 | }
41 | .product > img:hover {
42 | -ms-transform: scale(1.2);
43 | -webkit-transform: scale(1.2);
44 | transform: scale(1.2);
45 | z-index: 10;
46 | }
47 | .product_info {
48 | height: 100px;
49 | margin-bottom: 24px;
50 | }
51 | @media screen and (max-width: 700px) {
52 | .product {
53 | max-height: 700px;
54 | font-size: 14px;
55 | }
56 | }
57 | @media screen and (max-width: 1000px) {
58 | .product {
59 | font-size: 16px;
60 | }
61 | .product > img {
62 | max-height: 170px;
63 | }
64 | }
65 | @media screen and (max-width: 860px) {
66 | .product > img {
67 | max-height: 170px;
68 | }
69 | }
70 |
71 | .product > img {
72 | max-height: 200px;
73 | width: 100%;
74 | object-fit: contain;
75 | margin-top: 15px;
76 | margin-bottom: 15px;
77 | z-index: 1;
78 | }
79 | .overlay {
80 | position: absolute;
81 | top: 0;
82 | left: 0;
83 | height: 223px;
84 | width: 100%;
85 | background: rgba(0, 0, 0, 0.19);
86 | display: flex;
87 | align-items: center;
88 | justify-content: center;
89 | transition: none;
90 | }
91 |
92 | .overlay p {
93 | color: orange;
94 | background-color: rgb(14, 13, 13);
95 | transform: translateY(-150px);
96 | transition-property: transform;
97 | }
98 |
99 | .overlay:hover p {
100 | transform: translateY(0px);
101 | }
102 |
103 | .button {
104 | color: #f50057;
105 | display: flex;
106 | }
107 | .button:hover {
108 | color: rgb(0, 140, 255);
109 | }
110 | .product_price {
111 | margin-top: 5px;
112 | }
113 |
--------------------------------------------------------------------------------
/src/App.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import "./App.css";
3 | import Header from "./Header";
4 | import Home from "./Home";
5 | import {
6 | BrowserRouter as Router,
7 | Switch,
8 | Route,
9 | Redirect,
10 | } from "react-router-dom";
11 | import Cart from "./Cart";
12 | import SignIn from "./SignIn";
13 | import { useEffect } from "react";
14 | import { auth } from "./firebase";
15 | import { useStateValue } from "./StateProvider";
16 | import Payment from "./Payment";
17 | import { loadStripe } from "@stripe/stripe-js";
18 | import { Elements } from "@stripe/react-stripe-js";
19 | import Orders from "./Orders";
20 | import TestCart from "./TestCart";
21 | import Firstwindow from "./Firstwindow";
22 | import More from "./More";
23 | import "bootstrap/dist/css/bootstrap.min.css";
24 | import "bootstrap/dist/js/bootstrap.bundle";
25 | const promise = loadStripe(
26 | "pk_test_51J2xnJSF9T1v6nUZNUFLctUiiNQSGoZpYg8OIIUyuqUINVOiV9ZtLLOgSbmY8zn5bEIApAniuDPYJ5zIakjaCiJE00U8UqazMS"
27 | );
28 |
29 | function App() {
30 | const [{}, setUser] = useStateValue();
31 | useEffect(() => {
32 | auth.onAuthStateChanged((authUser) => {
33 | // console.log("The auth user -> ", authUser);
34 | if (authUser) {
35 | setUser({
36 | type: "SET_USER",
37 | user: authUser,
38 | });
39 | } else {
40 | setUser({
41 | type: "SET_USER",
42 | user: null,
43 | });
44 | }
45 | });
46 | }, []);
47 |
48 | return (
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 | );
88 | }
89 |
90 | export default App;
91 |
--------------------------------------------------------------------------------
/src/Footer.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { MDBCol, MDBContainer, MDBRow, MDBFooter } from "mdbreact";
3 | import "bootstrap/dist/css/bootstrap.min.css";
4 | import "bootstrap/dist/js/bootstrap.bundle";
5 | import Fab from "@material-ui/core/Fab";
6 | import StarBorderIcon from "@material-ui/icons/StarBorder";
7 | import "./Footer.css";
8 | import { useStateValue } from "./StateProvider";
9 | import { auth } from "./firebase";
10 | import ContactMailRoundedIcon from "@material-ui/icons/ContactMailRounded";
11 | import PhoneAndroidRoundedIcon from "@material-ui/icons/PhoneAndroidRounded";
12 | import { Link } from "react-router-dom";
13 | import SocialMedia from "./SocialMedia";
14 | const Footer = () => {
15 | const [{ cart, user }, setCart] = useStateValue();
16 |
17 | return (
18 |
93 | );
94 | };
95 |
96 | export default Footer;
97 |
--------------------------------------------------------------------------------
/src/Footer.css:
--------------------------------------------------------------------------------
1 | @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap");
2 | * {
3 | margin: 0;
4 | padding: 0;
5 | box-sizing: border-box;
6 | font-family: "Poppins", sans-serif;
7 | text-decoration: none;
8 | }
9 | footer {
10 | width: 100%;
11 | padding: 20px;
12 | bottom: 0;
13 | left: 0;
14 | background: rgba(255, 255, 255, 0.438);
15 | }
16 | footer .content {
17 | max-width: 1350px;
18 | margin: auto;
19 | padding: 40px;
20 | display: flex;
21 | flex-wrap: wrap;
22 | justify-content: space-between;
23 | }
24 | footer .content p,
25 | a {
26 | color: rgb(0, 0, 0);
27 | }
28 | footer .content .box {
29 | width: 33%;
30 | transition: all 0.4s ease;
31 | }
32 | footer .content .topic {
33 | font-size: 22px;
34 | font-weight: 600;
35 | color: rgb(0, 0, 0);
36 | margin-bottom: 16px;
37 | }
38 | .phone, .email{
39 | color: #0656eb;
40 | }
41 | .phone:hover, .email:hover{
42 | color: black;
43 | }
44 |
45 | footer .content p {
46 | text-align: justify;
47 | }
48 | footer .content .lower .topic {
49 | margin: 24px 0 5px 0;
50 | }
51 | footer .content .lower i {
52 | padding-right: 16px;
53 | }
54 | footer .content .middle {
55 | padding-left: 80px;
56 | }
57 | footer .content .middle a {
58 | line-height: 32px;
59 | }
60 | footer .content .right input[type="text"] {
61 | height: 45px;
62 | width: 100%;
63 | outline: none;
64 | color: #030303;
65 | background: rgb(255, 255, 255);
66 | border-radius: 5px;
67 | padding-left: 10px;
68 | font-size: 17px;
69 | border: 2px solid #222222;
70 | }
71 | footer .content .right input[type="submit"] {
72 | height: 42px;
73 | width: 200px;
74 | font-size: 18px;
75 | color: #ffffff;
76 | background: #0888ff;
77 | outline: none;
78 | border-radius: 10px;
79 | letter-spacing: 1px;
80 | cursor: pointer;
81 | margin-top: 12px;
82 | border: 2px solid #0669eb;
83 | transition: all 0.3s ease-in-out;
84 | }
85 | .content .right input[type="submit"]:hover {
86 | background: #ffffff;
87 | color: #000000;
88 | }
89 | footer .right .topic{
90 | padding-left: 15px;
91 | }
92 | /* footer .content .media-icons a {
93 | font-size: 16px;
94 | height: 45px;
95 | width: 45px;
96 | display: inline-block;
97 | text-align: center;
98 | line-height: 43px;
99 | border-radius: 5px;
100 | border: 2px solid #222222;
101 | margin: 30px 5px 0 0;
102 | transition: all 0.3s ease;
103 | }
104 | .content .media-icons a:hover {
105 | border-color: #5ab9f0;
106 | } */
107 | footer .bottom {
108 | width: 100%;
109 | text-align: center;
110 | justify-content: center;
111 | color: #d9d9d9;
112 | padding: 0 40px 5px 0;
113 | }
114 | footer .bottom a {
115 | color: #0656eb;
116 | }
117 | footer .lower a:hover{
118 | color: #000000;
119 | }
120 | footer a {
121 | transition: all 0.3s ease;
122 | }
123 | footer a:hover {
124 | color: #6aadfa;
125 | }
126 | @media (max-width: 1100px) {
127 | footer .content .middle {
128 | padding-left: 50px;
129 | }
130 | }
131 | @media (max-width: 950px) {
132 | footer .content .box {
133 | width: 50%;
134 | }
135 | .content .right {
136 | margin-top: 40px;
137 | }
138 | }
139 | @media (max-width: 560px) {
140 | footer {
141 | position: relative;
142 | }
143 | footer .content .box {
144 | width: 100%;
145 | margin-top: 30px;
146 | }
147 | footer .content .middle {
148 | padding-left: 0;
149 | }
150 | }
151 | .box .topic strong {
152 | margin-left: 140px;
153 | }
154 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Bookies [:blue_book:]("#" ":blue_book:")
2 |
3 | ## About
4 |
5 | A Full-fledged E-commerce web application integrated with stripe payment gateway, from where you can buy any eBook, or you can download or read them for free.
6 |
7 | I have made this application for self learners, so that the can save their money and also save their time to find resources.
8 |
9 | ## Features
10 |
11 | Products Features
12 |
13 | | Feature | Coded? | Description |
14 | | -------------------------- | :------: | :------------------------------------------------------------ |
15 | | Download eBooks | ✔ | Ability to to download eBooks for free |
16 | | Read eBooks | ✔ | Ability to read eBooks on the app for free |
17 | | Sign Up | ✔ | Ability to Create a new account |
18 | | Log In | ✔ | Ability to Log In |
19 | | Log Out | ✔ | Ability to Log Out |
20 | | Download Product | ✔ | Ability to download any product for free |
21 | | Add a Product into Cart | ✔ | Ability to add products to the cart |
22 | | Remove a Product from cart | ✔ | Ability to remove a product from the cart |
23 | | Product Review | ✔ | Ability to see the cart items list |
24 | | Sub Total | ✔ | Ability to show the subtotal of cart items |
25 | | Stripe Payment | ✔ | Ability to receive payment directly to an owners bank account |
26 | | Social Media | ✔ | Ability to move to Developer social media accounts |
27 |
28 | ## Demonstration
29 |
30 |
31 |
32 | [Bookies](https://user-images.githubusercontent.com/65366517/123590408-3a09f080-d808-11eb-9003-fde6cd62a179.mp4 "For Large Screens")
33 |
34 | [Bookies](https://user-images.githubusercontent.com/65366517/123589910-94ef1800-d807-11eb-9149-be25586f9f3c.mp4 "For Small Screens")
35 |
36 | ### Use it here [Bookies](https://clone-b8ccc.web.app/ "Bookies WebApp")
37 |
38 | NOTE: DO NOT BUY ANY eBOOK.
39 |
40 | ## Built With
41 |
42 | 1. HTML
43 | 2. CSS
44 | 3. BOOTSTRAP
45 | 4. REACT.JS/CONTEXT API
46 | 5. NODE.JS
47 | 6. EXPRESS.JS
48 | 7. FIREBASE _FOR DATABASE AND AUTHENTICATION_
49 | 8. STRIPE PAYMENT GATEWAY
50 |
51 | ## Getting Started
52 |
53 | ### Prerequisites
54 |
55 | - **NPM**
56 |
57 | ```
58 | npm install npm@latest -g
59 | ```
60 |
61 | ### Installation
62 |
63 | 1. Create new project on FIREBASE
64 | 2. Get free API key from Stripe
65 | 3. Clone the repo
66 |
67 | ```
68 | https://github.com/prateek-pixels/Bookies.git
69 | ```
70 |
71 | 4. Install NPM packages in _hosting and functions as well_
72 |
73 | ```
74 | npm install
75 | ```
76 |
77 | ## Contributing
78 |
79 | 1. Fork the Project
80 | 2. Create your Feature Branch
81 |
82 | ```
83 | git checkout -b feature/newFeatures
84 | ```
85 |
86 | 3. Commit your Changes
87 |
88 | ```
89 | git commit -m "Add some newFeatures"
90 | ```
91 |
92 | 4. Push to the Branch
93 |
94 | ```
95 | git push origin feature/newFeatures
96 | ```
97 |
98 | 5. Open a Pull Request
99 |
100 | My favourite Quote
101 |
102 | > Those who cannot remember the past are condemned to repeat it.
103 | > ~ George Santayana.
104 |
--------------------------------------------------------------------------------
/src/SignIn.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { useState } from "react";
3 | import { Link, useHistory } from "react-router-dom";
4 | import { auth } from "./firebase";
5 | import "./SignIn.css";
6 | import TextField from "@material-ui/core/TextField";
7 | import InputAdornment from "@material-ui/core/InputAdornment";
8 | function SignIn() {
9 | const history = useHistory();
10 | const [email, setEmail] = useState("");
11 | const [password, setPassword] = useState("");
12 |
13 | const signIn = (event) => {
14 | event.preventDefault();
15 | auth
16 | .signInWithEmailAndPassword(email, password)
17 | .then((auth) => {
18 | history.push("/");
19 | })
20 | .catch((error) => alert(error.message));
21 | };
22 |
23 | const register = (event) => {
24 | event.preventDefault();
25 | auth
26 | .createUserWithEmailAndPassword(email, password)
27 | .then((auth) => {
28 | // console.log(auth);
29 | if (auth) {
30 | history.push("/");
31 | }
32 | })
33 | .catch((error) => alert(error.message));
34 | };
35 |
36 | return (
37 | <>
38 | {/* https://i.ibb.co/KxSpZLm/unlock.png */}
39 |
40 |
41 |
42 |
43 |
44 |

49 |
50 |
110 |
111 |
112 |
113 |
114 | >
115 | );
116 | }
117 |
118 | export default SignIn;
119 |
--------------------------------------------------------------------------------
/.firebase/hosting.YnVpbGQ.cache:
--------------------------------------------------------------------------------
1 | about.txt,1624703764068,9ab2678f6a1d5ede27c80e7d5a0622989dc49da38f89353674bcc7b502cb327b
2 | android-chrome-192x192.png,1624703763917,bc6e4af6df0fd76c165d758de35ad874bfd9bcf71dd41062a2ab22d9503fb0db
3 | android-chrome-512x512.png,1624703763756,56330ec55dbd1a6baec51d3ca7d8ff7ec2765b0cf35b5ce64f042cbd54f4481d
4 | apple-touch-icon.png,1624703763672,635f76117892e747b5c30496382306f0c4c97c03f7db91c1b162d645bc71f0a3
5 | BookieSS.jpeg,1624704530478,bc417fe02fcb2cb871df0524e54210bf591d14ccf0a8a6becd316082b69e502d
6 | favicon-16x16.png,1624703763591,b55e24576516f2b6fcd8974fedf2ccc05db22f4da00e1b7ad9835414805f3f6f
7 | favicon-32x32.png,1624703763482,5d9fca2091cbcdbe43e737df3b275a367db95c1095acc2257a72871879f728d9
8 | favicon.ico,1624703763187,297e76e438516914ce006a1dbfb0a5d63ec653605192eee0a145ca5d48804abd
9 | manifest.json,499162500000,aff3449bdc238776f5d6d967f19ec491b36aed5fb7f23ccff6500736fd58494a
10 | Components/test.jsx,1623261997884,46b50c321b39e89a491b6727a01628c34245605a30beb3e7414c5e01cff90e6e
11 | asset-manifest.json,1624821805534,f891640aec93aabfe078ecfdfc9c29eda0247add53374b3a7d34759da23d1968
12 | index.html,1624821805533,9f330837b34625a5ccfd8fb10f881daea5b04e50ae4ce7469b2dffaaef01e1fa
13 | static/css/main.f9a056ff.chunk.css,1624821805425,3d4d88c06ee6badc45e74e1556c0848e919c6f3e3f5d9b256a88168eca7f2d53
14 | static/css/main.f9a056ff.chunk.css.map,1624821805533,d3e21a22c794c4b3204c38dee2bfbec2c5fdb5ca28d8b24c1c4251c9f447a259
15 | static/js/2.3d824574.chunk.js.LICENSE.txt,1624821805533,ae0c998a71b0a297220932fba58b65f3b42991dd4c8a240e428c72e9f9288191
16 | static/js/3.40f7c084.chunk.js,1624821805533,8f28e849deb618cb153e926bbc3703bc9805df415bdf7f56a9a470d535d18c76
17 | static/js/3.40f7c084.chunk.js.map,1624821805534,5065b2cee5df04e11e050e11808124c578666153b91398200935283a692326da
18 | static/js/runtime-main.0b44c211.js,1624821805455,02b9cd92b88c79ec21de798c1751ace0ecf45bf09bcd92b47fbdaad63d327c80
19 | static/media/arrow_left.2b063d13.svg,1624821805423,c06ec1a7030ba22dba6f9c435a0944ffab3f021c309a0cb5d64ddac2334a372c
20 | static/media/arrow_right.0897f985.svg,1624821805425,4ae23b65d972fea40fae9e9d4e035c313a8399c377c81f9105736b994ea935d9
21 | static/js/runtime-main.0b44c211.js.map,1624821805533,7cf176eeb2aabc4c5cc2d5c8b111d6a642006b3da9cacc0f51f5269d5cf4769d
22 | static/media/fa-regular-400.1017bce8.ttf,1624821805403,5b94be549fd8a5aaad71150b1bc0320fc64a8fa85960481a86243469e0076caf
23 | static/media/fa-regular-400.36722648.woff,1624821805403,66b0c41aa009e3511e3d50e73bacb1e2610977cadd6a7c39b61a1e53a11e4bf3
24 | static/media/fa-regular-400.68c5af1f.woff2,1624821805403,682676b9a4635c93e520444bca99632c5d9933ccc8972b228f99b6b68ef4b406
25 | static/media/fa-regular-400.4079ae2d.eot,1624821805402,56d573ad0adf72d9a169c09f752e8486f9638886ef8c9086a035e8fde97e9916
26 | static/js/main.4504100b.chunk.js.map,1624821805533,a833d90c8103436535bce25b4a853e6849ca6565b1916fb7d48a0a6f62d88efe
27 | static/js/main.4504100b.chunk.js,1624821805430,8fc244cf14277c936b9653fe14e24d71c53b31056c908b03bbbb3cdd3fcf55ba
28 | static/media/fa-regular-400.19e27d34.svg,1624821805403,5fb28d2fdc81c588e12297adf237d9b10423aca4636cb0f42da46960b1263e25
29 | static/media/fa-brands-400.c1210e5e.woff2,1624821805400,febc377716ecb54e3d884ba0fcde1422f6988efcbb00de314bb27b2319a57a06
30 | static/media/fa-solid-900.ada6e6df.woff2,1624821805403,1372dcb89880aed93ada00d7bef08bd992d7c949b67007e99f6c0be11eda15e5
31 | static/media/fa-brands-400.329a95a9.woff,1624821805403,1b42719786b7e76a71af1a44a57ea43abda8da1512a2140fb26fe7698c92e848
32 | static/media/fa-brands-400.89a52ae1.eot,1624821805403,d984c46096797bc379910883d455bbc4b6e65276af83dcb2259b56c87eda5a2a
33 | static/media/fa-solid-900.c6ec0800.woff,1624821805403,d096aa71777aa0eff9244c950b02a500d54bd34223cb649755bca4804877be90
34 | static/media/fa-brands-400.9e138496.ttf,1624821805403,d2fec613bc0824be7d57f25fcaf9252d0021538ce26589062598f5cdff5e347b
35 | static/media/fa-solid-900.efbd5d20.eot,1624821805403,8b7f27a7b6b5fac0b063ae245a6e047d2fe08a58ec874758478f6f4a2657c2ff
36 | static/media/fa-solid-900.07c3313b.ttf,1624821805403,cfa4da78991398e75581b5007f67892cf2fab691f46148579a170e2198493304
37 | static/css/2.5b1012e5.chunk.css,1624821805533,772fa211deffc33d8ffbc358eb49c726ea186883bc03cb5358f2fb559a13278e
38 | static/media/fa-solid-900.13de59f1.svg,1624821805399,b09fa23337028fa2fce6cfabcfb1a182721e9c8d4569de0ba7eb15bfc7ce4f81
39 | static/media/fa-brands-400.216edb96.svg,1624821805404,a05450629c0d156fc90b0b945d38a268543855d6514ab7fb24573214a6015e37
40 | static/css/2.5b1012e5.chunk.css.map,1624821805534,34d38c62cf3d6d4dcf1ed0d107be2e1ca2148d83b37d44549059903700fd1f2f
41 | static/js/2.3d824574.chunk.js,1624821805534,485d353144583b10542b05b8f094a3e74c4bc56f873fbfa778d69eaee803569b
42 | static/js/2.3d824574.chunk.js.map,1624821805538,85fe731c8689b89da346ab22147fa53537d966c490fc52cbb430528f9bfba38a
43 |
--------------------------------------------------------------------------------
/src/Payment.js:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import "./Payment.css";
3 | import CartItems from "./CartItems";
4 | import { useStateValue } from "./StateProvider";
5 | import { Link, useHistory } from "react-router-dom";
6 | import CurrencyFormat from "react-currency-format";
7 | import { getTotalAmount } from "./Reducer";
8 | import { CardElement, useElements, useStripe } from "@stripe/react-stripe-js";
9 | import { useEffect } from "react";
10 | import { Button } from "bootstrap/dist/js/bootstrap.bundle";
11 | import axios from "./axios";
12 | import "bootstrap/dist/css/bootstrap.min.css";
13 | import "bootstrap/dist/js/bootstrap.bundle";
14 | import { auth, db } from "./firebase";
15 | import lottie from "lottie-web";
16 | function Payment() {
17 | const [{ cart, user }, setCart] = useStateValue();
18 | const stripe = useStripe();
19 | const elements = useElements();
20 | const history = useHistory();
21 | const [error, setError] = useState(null);
22 | const [disabled, setDisabled] = useState(true);
23 | const [processing, setProcessing] = useState("");
24 | const [enabled, setEnabled] = useState(false);
25 | const [userSecret, setUserSecret] = useState(true);
26 |
27 | useEffect(() => {
28 | const getSecret = async () => {
29 | const response = await axios({
30 | method: "post",
31 | url: `/payments/create?total=${getTotalAmount(cart) * 100} `,
32 | });
33 | setUserSecret(response.data.userSecret);
34 | };
35 | getSecret();
36 | }, [cart]);
37 |
38 | // console.log("this userSecret is =>>>>", userSecret);
39 |
40 | const payment = async (event) => {
41 | event.preventDefault();
42 | setProcessing(true);
43 | const payload = await stripe
44 | .confirmCardPayment(userSecret, {
45 | payment_method: {
46 | card: elements.getElement(CardElement),
47 | },
48 | })
49 | .then(({ paymentIntent }) => {
50 | db.collection("Customer")
51 | .doc(user?.uid)
52 | .collection("orders")
53 | .doc(paymentIntent.id)
54 | .set({
55 | cart: cart,
56 | amount: paymentIntent.amount,
57 | created: paymentIntent.created,
58 | });
59 |
60 | setEnabled(true);
61 | setError(null);
62 | setProcessing(false);
63 |
64 | setCart({
65 | type: "EMPTY_CART",
66 | });
67 |
68 | history.replace("/orders");
69 | });
70 | };
71 |
72 | const handleChange = (event) => {
73 | setDisabled(event.empty);
74 | setError(event.error ? event.error.message : "");
75 | };
76 |
77 | return (
78 | <>
79 | {/* Stripe payment png: https://i.ibb.co/VTLQdYT/stripe.png */}
80 | {/* payment png: https://i.ibb.co/gDmsyg1/patment.png */}
81 |
82 |
83 |
84 |
85 |
86 |
87 |

92 |
93 |
94 |
User ID:
95 |
96 | {user?.email}
97 |
98 |
99 |
138 |
139 |
140 |
141 |
142 |
143 | >
144 | );
145 | }
146 |
147 | export default Payment;
148 |
--------------------------------------------------------------------------------
/src/Header.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import "./headerr.css";
3 | import SearchIcon from "@material-ui/icons/Search";
4 | import ShoppingCartIcon from "@material-ui/icons/ShoppingCart";
5 | import { Link } from "react-router-dom";
6 | import { useStateValue } from "./StateProvider";
7 | import { auth } from "./firebase";
8 | import { getTotalAmount } from "./Reducer";
9 | import CurrencyFormat from "react-currency-format";
10 | import StoreMallDirectoryRoundedIcon from "@material-ui/icons/StoreMallDirectoryRounded";
11 | import { NavLink } from "react-router-dom";
12 | import PersonIcon from "@material-ui/icons/Person";
13 | import HomeIcon from "@material-ui/icons/Home";
14 | import Badge from "@material-ui/core/Badge";
15 | import DirectionsWalkIcon from "@material-ui/icons/DirectionsWalk";
16 | import AccountBalanceIcon from "@material-ui/icons/AccountBalance";
17 | import "bootstrap/dist/css/bootstrap.min.css";
18 | import "bootstrap/dist/js/bootstrap.bundle";
19 | function Header() {
20 | const [{ cart, user }, setCart] = useStateValue();
21 |
22 | const signout = () => {
23 | if (user) {
24 | auth.signOut();
25 | }
26 | };
27 |
28 | return (
29 | <>
30 |
31 |
32 |
33 |
139 |
140 |
141 |
142 | >
143 | );
144 | }
145 |
146 | export default Header;
147 |
--------------------------------------------------------------------------------
/src/images/payment.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/More.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import "./Home.css";
3 | import { Link } from "react-router-dom";
4 | import Product from "./Product";
5 | import SocialMedia from "./SocialMedia";
6 | import "bootstrap/dist/css/bootstrap.min.css";
7 | import "bootstrap/dist/js/bootstrap.bundle";
8 | import FloatingSocialMedia from "./FloatingSocialMedia";
9 | import Footer from "./Footer";
10 | const breakPoints = [
11 | { width: 1, itemsToShow: 1 },
12 | { width: 550, itemsToShow: 2 },
13 | { width: 768, itemsToShow: 3 },
14 | { width: 1200, itemsToShow: 4 },
15 | ];
16 |
17 | function More() {
18 | return (
19 | <>
20 | {/* */}
21 |
22 |
23 |
71 |
105 |
141 |
142 |
143 |
154 |
164 |
165 |
177 |
178 |
179 |
189 |
201 |
202 |
214 |
227 |
228 |
229 |
240 |
252 |
253 |
265 |
277 |
278 |
279 |
280 |
281 |
282 |
283 | >
284 | );
285 | }
286 |
287 | export default More;
288 |
--------------------------------------------------------------------------------
/src/Home.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import "./Home.css";
3 | import { Link } from "react-router-dom";
4 | import Product from "./Product";
5 | import Carousal from "react-elastic-carousel";
6 | import Firstwindow from "./Firstwindow";
7 | import SocialMedia from "./SocialMedia";
8 | import "bootstrap/dist/css/bootstrap.min.css";
9 | import "bootstrap/dist/js/bootstrap.bundle";
10 | import FloatingSocialMedia from "./FloatingSocialMedia";
11 | import Footer from "./Footer";
12 | const breakPoints = [
13 | { width: 1, itemsToShow: 1 },
14 | { width: 550, itemsToShow: 2 },
15 | { width: 768, itemsToShow: 3 },
16 | { width: 1200, itemsToShow: 4 },
17 | ];
18 |
19 | function Home() {
20 |
21 | const scroll = () => {
22 | window.scrollTo(0, 0);
23 | }
24 |
25 | return (
26 | <>
27 |
28 |
29 |
30 | {/*

*/}
35 |
72 |
108 |
146 |
147 |
148 |
149 |
162 |
175 |
188 |
201 |
214 |
215 |
225 |
235 |
244 |
245 |
246 |
247 |
248 |
256 |
265 |
266 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 | >
288 | );
289 | }
290 |
291 | export default Home;
292 |
--------------------------------------------------------------------------------
/src/images/welcome.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------