├── .eslintrc.json
├── styles
├── globals.css
└── Home.module.css
├── public
├── skis.jpg
├── favicon.ico
├── logo-landscape.png
├── logo-mountain.png
├── vercel.svg
└── cart.js
├── postcss.config.js
├── pages
├── api
│ ├── [pid].js
│ ├── hello.js
│ ├── index.js
│ └── api.js
├── _app.js
├── index.js
├── products.js
├── product
│ └── [slug].js
├── contact.js
└── about.js
├── next.config.js
├── tailwind.config.js
├── .gitignore
├── package.json
├── README.md
└── Components
├── NavBar.js
└── Footer.js
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals"
3 | }
4 |
--------------------------------------------------------------------------------
/styles/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
--------------------------------------------------------------------------------
/public/skis.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IshanSingla/NextJsProjects/HEAD/public/skis.jpg
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IshanSingla/NextJsProjects/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/public/logo-landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IshanSingla/NextJsProjects/HEAD/public/logo-landscape.png
--------------------------------------------------------------------------------
/public/logo-mountain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IshanSingla/NextJsProjects/HEAD/public/logo-mountain.png
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/pages/api/[pid].js:
--------------------------------------------------------------------------------
1 | export default function handler(req, res) {
2 | const { pid } = req.query
3 | res.end(`Post: ${pid}`)
4 | }
--------------------------------------------------------------------------------
/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | reactStrictMode: true,
4 | swcMinify: true,
5 | }
6 |
7 | module.exports = nextConfig
8 |
--------------------------------------------------------------------------------
/pages/api/hello.js:
--------------------------------------------------------------------------------
1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2 |
3 | export default function handler(req, res) {
4 | res.status(200).json({ name: 'John Doe' })
5 | }
6 |
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | content: [
4 | "./pages/**/*.{js,ts,jsx,tsx}",
5 | "./components/**/*.{js,ts,jsx,tsx}",
6 | ],
7 | theme: {
8 | extend: {},
9 | },
10 | plugins: [],
11 | }
--------------------------------------------------------------------------------
/.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 | .env
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 |
16 | # production
17 | /build
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 | .pnpm-debug.log*
28 |
29 | # local env files
30 | .env*.local
31 |
32 | # vercel
33 | .vercel
34 |
35 | # typescript
36 | *.tsbuildinfo
37 | next-env.d.ts
38 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ishansingla",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "next": "12.3.0",
13 | "react": "18.2.0",
14 | "react-dom": "18.2.0",
15 | "simple-currency-format": "^2.3.0"
16 | },
17 | "devDependencies": {
18 | "autoprefixer": "^10.4.9",
19 | "eslint": "8.23.1",
20 | "eslint-config-next": "12.3.0",
21 | "postcss": "^8.4.16",
22 | "tailwindcss": "^3.1.8"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/pages/_app.js:
--------------------------------------------------------------------------------
1 | import '../styles/globals.css'
2 | import { useState } from 'react'
3 | import NavBar from '../Components/NavBar'
4 | import Footer from '../Components/Footer'
5 |
6 | function MyApp({ Component, pageProps }) {
7 |
8 | const [cart, setCart] = useState([])
9 | const [cartQty, setCartQty] = useState(0)
10 |
11 | const addToCart = (slug, qty, product) => {
12 | let newCart = cart
13 |
14 | const searchIndex = cart.findIndex((item) => item.slug==slug);
15 |
16 | if (searchIndex > -1) {
17 | cart[searchIndex].qty = cart[searchIndex].qty + qty
18 | setCart(cart)
19 | } else {
20 | newCart.push({slug: slug, qty: qty, price: product.price, name: product.name, image: product.image, category: product.category, currency: product.currency })
21 | setCart(newCart)
22 | }
23 |
24 | // calculating cart item count
25 | cartQty = cartQty + qty
26 | setCartQty(cartQty)
27 | }
28 |
29 | return <>
30 |
31 |
32 |
33 | >
34 | }
35 |
36 | export default MyApp
--------------------------------------------------------------------------------
/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 |
3 | export default function Home() {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 |
Let's make winter adventures!
11 |
Wasatch Ski Company
12 |
A pair of skis are the ultimate transportation to freedom. Skiing is a dance, and the mountain always leads. You can’t buy happiness, but you can buy a ski pass.
13 |
14 |
15 |
Shop Now
16 |
17 |
18 |
19 |
20 |
21 | )
22 | }
--------------------------------------------------------------------------------
/pages/api/index.js:
--------------------------------------------------------------------------------
1 | async function fetchAPI(query, { variables } = {},read ) {
2 | const url = read ? process.env.NEXT_PUBLIC_WEBINY_API_READ_URL : process.env.NEXT_PUBLIC_WEBINY_API_MANAGE_URL;
3 | const res = await fetch(url, {
4 | method: 'POST',
5 | headers: {
6 | 'Content-Type': 'application/json',
7 | 'Authorization': `Bearer ${process.env.WEBINY_API_SECRET}`
8 | },
9 | body: JSON.stringify({
10 | query,
11 | variables,
12 | }),
13 | });
14 | const json = await res.json()
15 | if (json.errors) {
16 | throw new Error('Failed to fetch API')
17 | }
18 | return json.data
19 | }
20 |
21 | export async function getProducts() {
22 | const products = await fetchAPI(
23 | ` query GetProducts {
24 | listProducts(limit: 10) {
25 | data {
26 | name,
27 | slug,
28 | description,
29 | image,
30 | category,
31 | size,
32 | color,
33 | price,
34 | currency,
35 | availableQty
36 | }
37 | }
38 | }
39 | `,
40 | {},
41 | true
42 | );
43 | return products.listProducts.data
44 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | First, run the development server:
6 |
7 | ```bash
8 | npm run dev
9 | # or
10 | yarn dev
11 | ```
12 |
13 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
14 |
15 | You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
16 |
17 | [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
18 |
19 | The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
20 |
21 | ## Learn More
22 |
23 | To learn more about Next.js, take a look at the following resources:
24 |
25 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
26 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
27 |
28 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
29 |
30 | ## Deploy on Vercel
31 |
32 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
33 |
34 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
35 |
--------------------------------------------------------------------------------
/Components/NavBar.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Link from 'next/link'
3 |
4 | const NavBar = ({cartQty}) => {
5 | return (
6 |
36 | )
37 | }
38 |
39 | export default NavBar
--------------------------------------------------------------------------------
/pages/products.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Link from "next/link";
3 | import { getProducts } from "./api/api";
4 |
5 | function Products(props) {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 |
13 | Product List
14 |
15 |
16 |
17 |
18 |
19 | {props.products.map((item) => {
20 | return (
21 |
22 |
23 |
28 |
29 | {item.category}
30 |
31 |
32 | {item.name}{" "}
33 |
34 |
35 |
36 | {item.description}
37 |
38 |
39 |
40 | Buy Now
41 |
42 |
43 |
44 |
45 | );
46 | })}
47 |
48 |
49 |
50 |
51 | );
52 | }
53 |
54 | export async function getServerSideProps(context) {
55 | return {
56 | props: {
57 | products: await getProducts(),
58 | },
59 | };
60 | }
61 |
62 | export default Products;
63 |
--------------------------------------------------------------------------------
/styles/Home.module.css:
--------------------------------------------------------------------------------
1 | .container {
2 | padding: 0 2rem;
3 | }
4 |
5 | .main {
6 | min-height: 100vh;
7 | padding: 4rem 0;
8 | flex: 1;
9 | display: flex;
10 | flex-direction: column;
11 | justify-content: center;
12 | align-items: center;
13 | }
14 |
15 | .footer {
16 | display: flex;
17 | flex: 1;
18 | padding: 2rem 0;
19 | border-top: 1px solid #eaeaea;
20 | justify-content: center;
21 | align-items: center;
22 | }
23 |
24 | .footer a {
25 | display: flex;
26 | justify-content: center;
27 | align-items: center;
28 | flex-grow: 1;
29 | }
30 |
31 | .title a {
32 | color: #0070f3;
33 | text-decoration: none;
34 | }
35 |
36 | .title a:hover,
37 | .title a:focus,
38 | .title a:active {
39 | text-decoration: underline;
40 | }
41 |
42 | .title {
43 | margin: 0;
44 | line-height: 1.15;
45 | font-size: 4rem;
46 | }
47 |
48 | .title,
49 | .description {
50 | text-align: center;
51 | }
52 |
53 | .description {
54 | margin: 4rem 0;
55 | line-height: 1.5;
56 | font-size: 1.5rem;
57 | }
58 |
59 | .code {
60 | background: #fafafa;
61 | border-radius: 5px;
62 | padding: 0.75rem;
63 | font-size: 1.1rem;
64 | font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
65 | Bitstream Vera Sans Mono, Courier New, monospace;
66 | }
67 |
68 | .grid {
69 | display: flex;
70 | align-items: center;
71 | justify-content: center;
72 | flex-wrap: wrap;
73 | max-width: 800px;
74 | }
75 |
76 | .card {
77 | margin: 1rem;
78 | padding: 1.5rem;
79 | text-align: left;
80 | color: inherit;
81 | text-decoration: none;
82 | border: 1px solid #eaeaea;
83 | border-radius: 10px;
84 | transition: color 0.15s ease, border-color 0.15s ease;
85 | max-width: 300px;
86 | }
87 |
88 | .card:hover,
89 | .card:focus,
90 | .card:active {
91 | color: #0070f3;
92 | border-color: #0070f3;
93 | }
94 |
95 | .card h2 {
96 | margin: 0 0 1rem 0;
97 | font-size: 1.5rem;
98 | }
99 |
100 | .card p {
101 | margin: 0;
102 | font-size: 1.25rem;
103 | line-height: 1.5;
104 | }
105 |
106 | .logo {
107 | height: 1em;
108 | margin-left: 0.5rem;
109 | }
110 |
111 | @media (max-width: 600px) {
112 | .grid {
113 | width: 100%;
114 | flex-direction: column;
115 | }
116 | }
117 |
118 | @media (prefers-color-scheme: dark) {
119 | .card,
120 | .footer {
121 | border-color: #222;
122 | }
123 | .code {
124 | background: #111;
125 | }
126 | .logo img {
127 | filter: invert(1);
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/Components/Footer.js:
--------------------------------------------------------------------------------
1 | function Footer() {
2 | return (
3 |
33 | )
34 | }
35 |
36 | export default Footer
--------------------------------------------------------------------------------
/pages/product/[slug].js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { useRouter } from 'next/router'
3 | import { getProduct } from '../api/api';
4 | import { currencyFormat } from 'simple-currency-format';
5 |
6 | const Slug = ({ product, addToCart }) => {
7 | const router = useRouter()
8 | const { slug } = router.query
9 | return (
10 |
11 |
12 |
13 |
14 |
15 |
16 |
Wasatch Ski Company
17 |
{product.name}
18 |
19 |
{product.category}
20 |
21 |
{product.description}
22 |
23 |
24 |
25 | { currencyFormat(product.price, 'en-IN', product.currency, 2) }
26 |
27 |
28 | { addToCart(slug, 1, product) }} className="flex ml-auto text-white bg-indigo-500 border-0 py-2 px-2 mx-3 focus:outline-none hover:bg-indigo-600 rounded">Add to Cart
29 | { router.push('/cart') }} className="flex ml-auto text-white bg-indigo-500 border-0 py-2 px-2 mx-2 focus:outline-none hover:bg-indigo-600 rounded">Checkout
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | )
39 | }
40 |
41 | export async function getServerSideProps(context) {
42 | return {
43 | props: {
44 | product: await getProduct(context.query.slug)
45 | }
46 | }
47 | }
48 |
49 |
50 | export default Slug
--------------------------------------------------------------------------------
/pages/contact.js:
--------------------------------------------------------------------------------
1 | export default function contact() {
2 | return (
3 | <>
4 |
5 |
6 |
17 |
18 |
19 |
20 |
21 | Feedback
22 |
23 |
24 | Post-ironic portland shabby chic echo park, banjo fashion axe
25 |
26 |
27 |
28 | Email
29 |
30 |
36 |
37 |
38 |
39 | Message
40 |
41 |
46 |
47 |
48 | Button
49 |
50 |
51 | Chicharrones blog helvetica normcore iceland tousled brook viral
52 | artisan.
53 |
54 |
55 |
56 |
57 | >
58 | );
59 | }
60 |
--------------------------------------------------------------------------------
/pages/api/api.js:
--------------------------------------------------------------------------------
1 | async function fetchAPI(query, { variables } = {},read ) {
2 | const url = read ? process.env.NEXT_PUBLIC_WEBINY_API_READ_URL : process.env.NEXT_PUBLIC_WEBINY_API_MANAGE_URL;
3 | const res = await fetch(url, {
4 | method: 'POST',
5 | headers: {
6 | 'Content-Type': 'application/json',
7 | 'Authorization': `Bearer ${process.env.WEBINY_API_SECRET}`
8 | },
9 | body: JSON.stringify({
10 | query,
11 | variables,
12 | }),
13 | });
14 | const json = await res.json()
15 | if (json.errors) {
16 | throw new Error('Failed to fetch API')
17 | }
18 | return json.data
19 | }
20 |
21 | export async function getProducts() {
22 | const products = await fetchAPI(
23 | ` query GetProducts {
24 | listProducts(limit: 10) {
25 | data {
26 | name,
27 | slug,
28 | description,
29 | image,
30 | category,
31 | size,
32 | color,
33 | price,
34 | currency,
35 | availableQty
36 | }
37 | }
38 | }
39 | `,
40 | {},
41 | true
42 | );
43 | return products.listProducts.data
44 | }
45 | export async function getProduct(slug) {
46 | let product = await fetchAPI(
47 | ` query GetProduct {
48 | getProduct(where: {slug: "${slug}"}) {
49 | data {
50 | name,
51 | slug,
52 | description,
53 | image,
54 | category,
55 | size,
56 | color,
57 | price,
58 | currency,
59 | availableQty
60 | }
61 | }
62 | }
63 | `,
64 | {},
65 | true
66 | );
67 | return product.getProduct.data
68 | }
69 | export async function createOrder(data){
70 | const response = await fetchAPI(`
71 | mutation CreateOrder($orderId:String!, $status: String, $currency: String, $amount: Number, $products: String){
72 | createOrder(data: { orderId: $orderId, status: $status, currency: $currency, amount: $amount, products: $products}){
73 | data {
74 | orderId,
75 | id
76 | },
77 | error {
78 | data
79 | }
80 | }
81 | }
82 | `,{
83 | variables:{
84 | 'orderId': data.orderId,
85 | 'status': data.status,
86 | 'currency': data.currency,
87 | 'amount': data.amount,
88 | 'products': data.products
89 | }
90 | }, false);
91 | return response.createOrder.data;
92 | }
93 | export async function updateOrder(data){
94 | const response = await fetchAPI(`
95 | mutation UpdateOrder($revision: ID!, $orderId:String!, $status: String, $currency: String, $amount: Number, $products: String){
96 | updateOrder(revision: $revision, data: {orderId: $orderId, status: $status, currency: $currency, amount: $amount, products: $products}){
97 | data {
98 | orderId,
99 | id
100 | },
101 | error {
102 | data
103 | }
104 | }
105 | }
106 | `,{
107 | variables: {
108 | 'revision': data.revision,
109 | 'orderId': data.orderId,
110 | 'status': data.status,
111 | 'currency': data.currency,
112 | 'amount': data.amount,
113 | 'products': data.products
114 | }
115 | }, false);
116 | return response.updateOrder.data;
117 | }
--------------------------------------------------------------------------------
/pages/about.js:
--------------------------------------------------------------------------------
1 | export default function about() {
2 | return (
3 | <>
4 |
5 |
6 |
7 |
12 |
13 |
14 |
15 |
28 |
29 |
30 | Shooting Stars
31 |
32 |
33 | Blue bottle crucifix vinyl post-ironic four dollar toast vegan
34 | taxidermy. Gastropub indxgo juice poutine.
35 |
36 |
37 | Learn More
38 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | The Catalyzer
71 |
72 |
73 | Blue bottle crucifix vinyl post-ironic four dollar toast vegan
74 | taxidermy. Gastropub indxgo juice poutine.
75 |
76 |
77 | Learn More
78 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | Neptune
110 |
111 |
112 | Blue bottle crucifix vinyl post-ironic four dollar toast vegan
113 | taxidermy. Gastropub indxgo juice poutine.
114 |
115 |
116 | Learn More
117 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 | >
135 | );
136 | }
137 |
--------------------------------------------------------------------------------
/public/cart.js:
--------------------------------------------------------------------------------
1 | // import React, { useEffect, useState } from "react";
2 | // import Link from 'next/link'
3 | // import { createOrder, updateOrder} from './api/api';
4 | // import { useRouter } from 'next/router'
5 | // import { currencyFormat } from 'simple-currency-format';
6 |
7 | // function Cart({cart, removeFromCart}) {
8 | // const [subtotal, setSubtotal] = useState(0)
9 | // const router = useRouter()
10 |
11 | // useEffect(() => {
12 | // let myTotal = 0;
13 | // cart.map(item => {
14 | // myTotal = myTotal + (item.qty * item.price)
15 | // })
16 | // setSubtotal(myTotal)
17 | // })
18 |
19 | // function createUpdateOrderAndCheckout() {
20 | // if (localStorage.getItem("orderId")) {
21 | // // Existing Order found in local storage, update the order
22 | // updateOrder(
23 | // {
24 | // revision: localStorage.getItem("orderRevisionId"),
25 | // orderId: localStorage.getItem("orderId"),
26 | // status: "Created",
27 | // currency: process.env.NEXT_PUBLIC_STORE_CURRENCY,
28 | // amount: subtotal + 100,
29 | // products: JSON.stringify(cart)
30 | // }
31 | // ).then((orderResponse)=> {
32 | // // If condition to check order updated successfully
33 | // if (orderResponse) {
34 | // router.push({
35 | // pathname: '/checkout'
36 | // })
37 | // }
38 | // })
39 | // } else {
40 | // // Since no orderId in local storage, create new order
41 | // let random = Math.random()*100000000
42 | // let orderId = "WSC-" + Math.trunc(random+ Date.now())
43 | // orderId = "11Sep-" + orderId;
44 | // createOrder(
45 | // {
46 | // orderId: orderId,
47 | // status: "Created",
48 | // currency: process.env.NEXT_PUBLIC_STORE_CURRENCY,
49 | // amount: subtotal + 100,
50 | // products: JSON.stringify(cart)
51 | // }
52 | // ).then((orderResponse)=> {
53 | // // If condition to check make sure order created successfully
54 | // if (orderResponse) {
55 | // localStorage.setItem("orderId", orderId);
56 | // localStorage.setItem("orderRevisionId", orderResponse.id);
57 | // router.push({
58 | // pathname: '/checkout'
59 | // })
60 | // }
61 | // })
62 | // }
63 | // }
64 |
65 | // return (
66 | // <>
67 | //
68 | //
69 | //
70 | //
71 | //
72 | //
Shopping Cart
73 | //
74 | //
75 | //
76 | // {cart.length?
77 | //
78 | //
Product
79 | // Quantity
80 | // Remove
81 | // Subtotal
82 | //
83 | // :
84 | //
85 | //
86 | // Oh! your cart is empty, let's start shopping!
87 | //
88 | //
89 | // }
90 |
91 | // {
92 | // cart.map((item, index) => {
93 | // return
94 | //
95 | //
96 | //
97 | //
98 | //
99 | //
100 | // {item.name}
101 | // {item.category}
102 | //
103 | //
104 | //
105 | //
106 | // {item.qty}
107 | //
108 | //
109 | // { removeFromCart(item) }} className="font-semibold hover:text-red-500 text-gray-500 text-xs">Remove
110 | //
111 | //
112 | // { currencyFormat(item.qty * item.price, process.env.NEXT_PUBLIC_STORE_LOCALE, item.currency, 2) }
113 | //
114 | //
115 | // })
116 | // }
117 |
118 | // {
119 | // cart.length?
120 | //
121 | //
122 | //
123 | // Continue Shopping
124 | //
125 | //
126 | // :``
127 | // }
128 | //
129 |
130 | //
131 | //
Order Summary
132 | //
133 | // Subtotal
134 | //
135 | // { currencyFormat(subtotal, process.env.NEXT_PUBLIC_STORE_LOCALE, process.env.NEXT_PUBLIC_STORE_CURRENCY, 2) }
136 | //
137 | //
138 | //
139 | // Shipping
140 | //
141 | //
142 | // {/* TODO: Hardcoded the Stardard shipping charges to 100 (any CurrencyUOM) */}
143 | // Standard shipping - { currencyFormat(100, process.env.NEXT_PUBLIC_STORE_LOCALE, process.env.NEXT_PUBLIC_STORE_CURRENCY, 2) }
144 | //
145 | //
146 | //
147 | //
148 | //
149 | // Total
150 | //
151 | // {/* TODO: Hardcoded the Stardard shipping charges to 100 (any CurrencyUOM) */}
152 | // { currencyFormat(subtotal + 100, process.env.NEXT_PUBLIC_STORE_LOCALE, process.env.NEXT_PUBLIC_STORE_CURRENCY, 2) }
153 | //
154 | //
155 | //
Checkout
156 | //
157 | //
158 | //
159 | //
160 |
161 | //
168 | // >
169 | // );
170 | // }
171 |
172 | // export default Cart;
--------------------------------------------------------------------------------