-
-
-
-
-
-
-
})
+
+ {order.items.map((item) => (
+
+
+
+
+
+
+
+
})
+
-
-
-
- Title: {item.title}
-
-
- Description: {item.description}
-
-
-
- ${parseFloat(item.price).toFixed(2)}
-
+
+
+ Title: {item.title}
+
+
+ Description:{" "}
+ {item.description}
+
+
+
+ ${parseFloat(item.price).toFixed(2)}
+
+
-
- ))}
+ ))}
+
-
- ))}
+ ))
+ )}
@@ -164,4 +227,3 @@ const Orders = ({ }) => {
};
export default Orders;
-
diff --git a/pages/orders/style.scss b/pages/orders/style.scss
index 372df65..a3f310c 100644
--- a/pages/orders/style.scss
+++ b/pages/orders/style.scss
@@ -166,7 +166,7 @@
text-transform: uppercase;
}
.a-color-secondary, .a-color-tertiary {
- color: #565959!important;
+ color: #202020!important;
}
.a-size-base {
@@ -175,7 +175,7 @@
}
.a-color-secondary, .a-color-tertiary {
- color: #565959!important;
+ color: #202020!important;
}
.a-row .a-span2, .a-ws .a-row .a-ws-span2 {
width: 14.948%;
diff --git a/pages/signin/index.jsx b/pages/signin/index.jsx
index ffa6e5e..8aeecba 100644
--- a/pages/signin/index.jsx
+++ b/pages/signin/index.jsx
@@ -1,52 +1,51 @@
-import Head from 'next/head';
-import { useState, useEffect } from 'react';
-import store2 from 'store2';
-import Router from 'next/router';
-import Creatable from 'react-select/creatable';
-import axios from '../../src/services/axios';
-import './style.scss';
+import Head from "next/head";
+import { useState, useEffect } from "react";
+import store2 from "store2";
+import Router from "next/router";
+import Creatable from "react-select/creatable";
+import axios from "../../src/services/axios";
+import "./style.scss";
const usernameOptions = [
{
- label: 'Accepted usernames are',
+ label: "Accepted usernames are",
options: [
- { value: 'demouser', label: 'demouser' },
- { value: 'image_not_loading_user', label: 'image_not_loading_user' },
- { value: 'existing_orders_user', label: 'existing_orders_user' },
- { value: 'fav_user', label: 'fav_user' },
- { value: 'locked_user', label: 'locked_user' }
- ]
- }
+ { value: "demouser", label: "demouser" },
+ { value: "image_not_loading_user", label: "image_not_loading_user" },
+ { value: "existing_orders_user", label: "existing_orders_user" },
+ { value: "fav_user", label: "fav_user" },
+ { value: "locked_user", label: "locked_user" },
+ ],
+ },
];
const passwordOptions = [
{
- label: 'Password for all users',
- options: [{ value: 'testingisfun99', label: 'testingisfun99' }]
- }
+ label: "Password for all users",
+ options: [{ value: "testingisfun99", label: "testingisfun99" }],
+ },
];
const groupStyles = {
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "space-between",
};
const groupBadgeStyles = {
- backgroundColor: '#EBECF0',
- borderRadius: '2em',
- color: '#172B4D',
- display: 'inline-block',
+ backgroundColor: "#EBECF0",
+ borderRadius: "2em",
+ color: "#172B4D",
+ display: "inline-block",
fontSize: 12,
- fontWeight: 'normal',
- lineHeight: '1',
+ fontWeight: "normal",
+ lineHeight: "1",
minWidth: 1,
- padding: '0.16666666666667em 0.5em',
- textAlign: 'center',
+ padding: "0.16666666666667em 0.5em",
+ textAlign: "center",
};
-
-const formatGroupLabel = data => (
+const formatGroupLabel = (data) => (
{data.label}
{data.options.length}
@@ -54,103 +53,270 @@ const formatGroupLabel = data => (
);
const SignIn = () => {
- const [userName, setUsername] = useState('');
- const [password, setPassword] = useState('');
- const [apiError, setApiError] = useState('');
- const userSession = store2.session.get('username');
+ const [userName, setUsername] = useState("");
+ const [password, setPassword] = useState("");
+ const [apiError, setApiError] = useState("");
+ const userSession = store2.session.get("username");
if (userSession) {
- Router.replace('/');
+ Router.replace("/");
return <>>;
}
- const handleChange = selectedOption => {
+ const handleChange = (selectedOption) => {
setUsername(selectedOption.value);
};
useEffect(() => {
- setApiError('');
+ setApiError("");
}, [setApiError]);
- const formHandler = e => {
+ const formHandler = (e) => {
e.preventDefault();
- setApiError('');
- axios.post('/api/signin', {
- userName,
- password
- }).then((data) => {
- store2.session.set('username', userName);
- if (window.location.search.indexOf('checkout') >= 0) {
- Router.replace('/checkout');
- } else if (window.location.search.indexOf('favourites') >= 0) {
- Router.replace('/favourites');
- } else if (window.location.search.indexOf('offers') >= 0) {
- Router.replace('/offers');
- } else if (window.location.search.indexOf('orders') >= 0) {
- Router.replace('/orders');
- } else {
- Router.replace({
- pathname: '/',
- query: { signin: 'true' },
- });
- }
- }).catch((err) => {
- store2.session.remove('username');
- setApiError(err.response.data.errorMessage);
- });
+ setApiError("");
+ axios
+ .post("/api/signin", {
+ userName,
+ password,
+ })
+ .then((data) => {
+ store2.session.set("username", userName);
+ if (window.location.search.indexOf("checkout") >= 0) {
+ Router.replace("/checkout");
+ } else if (window.location.search.indexOf("favourites") >= 0) {
+ Router.replace("/favourites");
+ } else if (window.location.search.indexOf("offers") >= 0) {
+ Router.replace("/offers");
+ } else if (window.location.search.indexOf("orders") >= 0) {
+ Router.replace("/orders");
+ } else {
+ Router.replace({
+ pathname: "/",
+ query: { signin: "true" },
+ });
+ }
+ })
+ .catch((err) => {
+ store2.session.remove("username");
+ setApiError(err.response.data.errorMessage);
+ });
};
return (
<>
-
StackDemo
-
+
StackDemo Change
+
-
diff --git a/pages/signin/style.scss b/pages/signin/style.scss
index 697e5c2..3ed631c 100644
--- a/pages/signin/style.scss
+++ b/pages/signin/style.scss
@@ -59,7 +59,7 @@
text-transform: none;
}
.Button_root__24MxS {
- background-color: #333;
+ background-color: #682020;
color: rgb(241, 243, 245);
cursor: pointer;
display: inline-flex;
diff --git a/src/components/FloatChart/style.scss b/src/components/FloatChart/style.scss
index c2b35f0..5d02132 100644
--- a/src/components/FloatChart/style.scss
+++ b/src/components/FloatChart/style.scss
@@ -3,7 +3,7 @@
top: 0;
right: -450px;
width: 450px;
- height: calc(100% - (75px));
+ height: calc(100% - (85px));
background-color: #1b1a20;
box-sizing: border-box;
@@ -11,7 +11,7 @@
&--open {
right: 0;
- margin-top: 75px;
+ margin-top: 85px;
}
&__close-btn {
@@ -46,7 +46,7 @@
&--float-cart-closed {
position: absolute;
background-color: #000;
- margin-top: 75px;
+ margin-top: 100px;
background-size: 50%;
left: -60px;
width: 60px;
diff --git a/src/components/Header/index.jsx b/src/components/Header/index.jsx
index f304eba..68aa2cf 100644
--- a/src/components/Header/index.jsx
+++ b/src/components/Header/index.jsx
@@ -1,144 +1,487 @@
-import store2 from 'store2';
-import Link from 'next/link';
-import Router from 'next/router';
+import store2 from "store2";
+import Link from "next/link";
+import Router from "next/router";
-import useWindowSize from '../utils/useWindowSize';
-import './style.scss';
+import useWindowSize from "../utils/useWindowSize";
+import "./style.scss";
const Header = () => {
- const userName = store2.session.get('username');
+ const userName = store2.session.get("username");
const size = useWindowSize();
const logOutHandler = (e) => {
e.preventDefault();
if (userName) {
store2.session.clearAll();
- Router.replace('/');
+ Router.replace("/");
} else {
- Router.replace('/signin');
+ Router.replace("/signin");
}
};
return (
+
+ Sample Announcement!!
+
diff --git a/src/components/Shelf/Filter/index.jsx b/src/components/Shelf/Filter/index.jsx
index 458075d..3f4b6fd 100644
--- a/src/components/Shelf/Filter/index.jsx
+++ b/src/components/Shelf/Filter/index.jsx
@@ -5,7 +5,7 @@ import { connect } from 'react-redux';
import { updateFilters } from '../../../services/filters/actions';
import Checkbox from '../../CheckBox';
-const availableSizes = ['Apple', 'Samsung', 'Google', 'OnePlus'];
+const availableSizes = ['Apple', 'Samsung', 'Google', 'One Plus'];
import './style.scss';
diff --git a/src/components/Shelf/style.scss b/src/components/Shelf/style.scss
index 48271ee..7ce5c30 100644
--- a/src/components/Shelf/style.scss
+++ b/src/components/Shelf/style.scss
@@ -100,7 +100,7 @@
}
&__buy-btn {
- background-color: #1b1a20;
+ background-color: #676767;
color: #fff;
padding: 15px 0;
margin-top: 10px;