Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Bump hosted-git-info from 2.8.8 to 2.8.9 #67

Open
wants to merge 78 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
a1de362
Bump acorn from 5.7.3 to 5.7.4
dependabot[bot] Mar 16, 2020
44e41ca
Merge pull request #2 from hildakh/homepage/feature
hildakh Mar 16, 2020
732a657
Merge pull request #3 from hildakh/homepage/feature
hildakh Mar 17, 2020
a7298d6
Merge pull request #4 from hildakh/homepage/feature
hildakh Mar 17, 2020
9f4bb36
Merge pull request #5 from hildakh/router/feature
hildakh Mar 18, 2020
eb75ec8
Merge pull request #6 from hildakh/shop/feature
hildakh Mar 18, 2020
ca29db7
Merge pull request #7 from hildakh/previewcollection/feature
hildakh Mar 19, 2020
93531ae
Merge pull request #8 from hildakh/item/collection
hildakh Mar 19, 2020
53f3442
Merge pull request #9 from hildakh/header/feature
hildakh Mar 20, 2020
e054918
Merge pull request #10 from hildakh/signin/signup
hildakh Mar 21, 2020
4bb8709
Merge pull request #11 from hildakh/button/component
hildakh Mar 21, 2020
bd616c5
Merge pull request #12 from hildakh/firebase/setting
hildakh Mar 21, 2020
53f29be
Merge pull request #13 from hildakh/firebase/setting
hildakh Mar 21, 2020
79d0285
Merge pull request #14 from hildakh/googleauth/2
hildakh Mar 22, 2020
beb9731
Merge pull request #15 from hildakh/firebase/storedata
hildakh Mar 24, 2020
b492d26
Merge pull request #16 from hildakh/firebase/storedata
hildakh Mar 25, 2020
829ac70
Merge pull request #17 from hildakh/userdata-in-app
hildakh Mar 26, 2020
6b3b636
Merge pull request #18 from hildakh/userdata-in-app
hildakh Mar 26, 2020
564a517
Merge pull request #19 from hildakh/signup-feature
hildakh Mar 26, 2020
255d471
Merge pull request #20 from hildakh/signup-feature
hildakh Mar 27, 2020
b033d28
Merge pull request #21 from hildakh/signin-feature
hildakh Mar 28, 2020
70f4e34
Merge pull request #22 from hildakh/redux-feature
hildakh Apr 3, 2020
cf24a1c
Merge pull request #23 from hildakh/redirect
hildakh Apr 3, 2020
857afd4
Merge pull request #24 from hildakh/cart
hildakh Apr 4, 2020
173abbc
Merge pull request #25 from hildakh/cart
hildakh Apr 8, 2020
fb1eb40
Merge pull request #1 from hildakh/dependabot/npm_and_yarn/acorn-5.7.4
hildakh Apr 8, 2020
6272b14
Merge pull request #26 from hildakh/preview
hildakh Apr 8, 2020
a3b8c0f
Merge pull request #27 from hildakh/preview
hildakh Apr 26, 2020
7130cbe
custom button modified to be used on collections items and be visible…
hildakh Apr 26, 2020
1fd7f1a
Merge pull request #28 from hildakh/redux-feature
hildakh Apr 26, 2020
94a7cd7
info added to .env file
hildakh Apr 26, 2020
f0a7f37
modified
hildakh Apr 26, 2020
ffac59f
Delete firebase.utils.js
hildakh Apr 26, 2020
3eebc1d
reducer for adding items to cart added. app data moved to .env file. …
hildakh Apr 26, 2020
41b91d1
conflicts resolved
hildakh Apr 26, 2020
a3d8c35
Merge pull request #30 from hildakh/cart-reducer
hildakh Apr 26, 2020
bebe209
add item to cart action added to card button to complete the function…
hildakh Apr 26, 2020
9dd9878
Merge pull request #31 from hildakh/cart-reducer
hildakh Apr 26, 2020
c92a990
function for incrementing item count added to cart reducer
hildakh May 4, 2020
7ef4b90
cart reducer implemented the new function
hildakh May 4, 2020
1443a90
shop data changed for products to have unique ids
hildakh May 4, 2020
a167f76
inccreasing quantity of cart items implemented in cart reducer
hildakh May 4, 2020
80a7e88
Merge pull request #32 from hildakh/cart-reducer
hildakh May 4, 2020
506859c
cartItem was created and added to cart drop down
hildakh May 8, 2020
5b05364
Merge pull request #33 from hildakh/cart-reducer
hildakh May 8, 2020
d64cca8
used reselect to update cart dropdown and carticon with memoized sele…
hildakh May 8, 2020
c854332
Merge pull request #34 from hildakh/cart-reducer
hildakh May 8, 2020
38f0d47
added redirects to public for Netlify page refresh
hildakh May 8, 2020
2d7ece7
Merge pull request #35 from hildakh/cart-reducer
hildakh May 8, 2020
e446604
page id removed from shop path
hildakh May 8, 2020
83ae44d
Merge pull request #36 from hildakh/cart-reducer
hildakh May 8, 2020
36e37d4
user selectors added and used to replaced mapStateToProps along with …
hildakh May 9, 2020
3ca5813
Merge pull request #37 from hildakh/user-selector
hildakh May 9, 2020
11c7ce1
styling added to empty cart
hildakh May 9, 2020
6851f2d
checkout page and link to it from cart added
hildakh May 9, 2020
b6ce9f8
Merge pull request #38 from hildakh/checkout
hildakh May 9, 2020
3e44d6a
checkout page updated with items from the cart and the total price
hildakh May 9, 2020
8e660af
Merge pull request #39 from hildakh/checkout
hildakh May 9, 2020
226469e
cart hidden on checkout page using dispatch shorthand and connect
hildakh May 9, 2020
bd9b722
Merge pull request #40 from hildakh/checkout
hildakh May 9, 2020
cf1aaba
cart items details added to checkout page
hildakh May 9, 2020
42aa17b
Merge pull request #41 from hildakh/checkout
hildakh May 9, 2020
c78be61
remove item from cart finished
hildakh May 11, 2020
fc38a8a
Merge pull request #42 from hildakh/checkout
hildakh May 11, 2020
c47800c
clear, add and remove item from cart completed
hildakh May 11, 2020
7138856
Merge pull request #43 from hildakh/checkout
hildakh May 11, 2020
8588028
Redux persist (#44)
hildakh May 24, 2020
5d72053
Redux refactor (#45)
hildakh May 24, 2020
74a0351
removed yarn lock and used npm instaed
Oct 30, 2020
5f634d2
Add renovate.json (#49)
renovate[bot] Oct 30, 2020
53f5ef3
moving directory and collection state into redux (#52)
hildakh Oct 30, 2020
9059cc1
Update dependency react-scripts to v4 (#54)
renovate[bot] Oct 30, 2020
fd1f527
Feature/collection overview (#56)
hildakh Nov 15, 2020
b4ed05d
Feature/collection overview (#57)
hildakh Nov 16, 2020
52f47fc
fix/data-normalization(#58)
hildakh Nov 16, 2020
ba3ca14
(#59)
hildakh Nov 16, 2020
5004cc8
Add Stripe (#60)
hildakh Nov 16, 2020
b76fe61
Bump hosted-git-info from 2.8.8 to 2.8.9
dependabot[bot] May 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
REACT_APP_API_KEY=AIzaSyB4Uu7LcQeFikYHn3KD8tGYO9NUZFlfcIk
REACT_APP_AUTH_DOMAIN=my-glam-shop.firebaseapp.com
REACT_APP_DATABASE_URL=https://my-glam-shop.firebaseio.com
REACT_APP_PROJECT_ID=my-glam-shop
REACT_APP_STORAGE_BUCKET=my-glam-shop.appspot.com
REACT_APP_MESSAGING_SENDER_ID=202382612290
REACT_APP_APP_ID=1:202382612290:web:9f10c9532b88c2c2025adb
REACT_APP_MEASUREMENT_ID=G-9MCE965PEE

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
.env.development.local
.env.test.local
.env.production.local
.env

debug.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"semi": true
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo
Redux
Redux-logger
React-redux
Reselect
Redux-persist

## Available Scripts

Expand Down
19,345 changes: 19,345 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"firebase": "^7.12.0",
"lodash.memoize": "^4.1.2",
"node-sass": "^4.13.1",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"react-redux": "^7.2.0",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.0",
"react-scripts": "4.0.0",
"react-stripe-checkout": "^2.6.3",
"redux": "^4.0.5",
"redux-logger": "^3.0.6"
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"reselect": "^4.0.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down
2 changes: 2 additions & 0 deletions public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

/* /index.html 200
5 changes: 5 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"config:base"
]
}
4 changes: 4 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ a {

* {
box-sizing: border-box;
}

::-webkit-scrollbar {
display: none;
}
16 changes: 12 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import React, { Component } from "react";
import "./App.css";

import Header from "./components/header/Header";

import HomePage from "./pages/homepage/HomePage";
import ShopPage from "./pages/shop/Shop";
import { Switch, Route, Redirect } from "react-router-dom";
import Header from "./components/header/Header";
import SignInSignUp from "./pages/signin&signup/SignIn-SignUp";
import CheckoutPage from './pages/checkout/CheckoutPage';

// used to store the state of the user in the app
import { auth, createUserProfileDocument } from "./firebase/firebase.utils";
import { connect } from "react-redux";
import { setCurrentUser } from "./redux/user/user.actions";
import { selectCurrentUser } from './redux/user/user.selectors';
import { createStructuredSelector } from 'reselect';

class App extends Component {
// closing subscription once the app unmounts
Expand Down Expand Up @@ -46,18 +52,20 @@ class App extends Component {
<Switch>
<Route exact path="/" component={HomePage} />
<Route exact path="/signup" render={() => this.props.currentUser ? (<Redirect to='/'/>) : (<SignInSignUp />)} />
<Route path="/shop/:id" component={ShopPage} />
<Route path="/shop" component={ShopPage} />
<Route exact path="/signin" render={() => this.props.currentUser ? (<Redirect to='/'/>) : (<SignInSignUp />)} />
<Route exact path="/checkout" component={CheckoutPage} />
</Switch>
</div>
);
}
}

//getting the userReducer off of state
const mapStateToProps = ({ user }) => ({
currentUser: user.currentUser
const mapStateToProps = createStructuredSelector ({
currentUser: selectCurrentUser
});

const mapDispatchToProps = dispatch => ({
setCurrentUser: user => dispatch(setCurrentUser(user))
});
Expand Down
50 changes: 40 additions & 10 deletions src/components/cart-dropdown/Cart-Dropdown.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,44 @@
import React from 'react';
import React from "react";
import { connect } from "react-redux";
import CartItem from "../cart-item/CartItem";
import { selectCartItems } from "../../redux/cart/cart.selectors";
import { toggleCartHidden } from "../../redux/cart/cart.actions";
import { createStructuredSelector } from "reselect";
import { withRouter } from "react-router-dom";
import CustomButton from "../custom-button/CustomButton";

import CustomButton from '../custom-button/CustomButton';
import "./Cart-Dropdown.styles.scss";

import './Cart-Dropdown.styles.scss';
const CartDropdown = ({ cartItems, history, dispatch }) => {
return (
<div className="cart-dropdown">

const CartDropdown = () => (
<div className="cart-dropdown">
<div className='cart-items' />
<CustomButton>GO TO CHECKOUT</CustomButton>
</div>
)
<div className="cart-items">
{cartItems.length ? (
cartItems.map((cartItem) => (
<CartItem key={cartItem.id} item={cartItem} />
))
) : (
<span className="empty-message">Your cart is empty</span>
)}
</div>

export default CartDropdown;
<CustomButton
onClick={() => {
history.push("/checkout");
dispatch(toggleCartHidden());
}}
>
GO TO CHECKOUT
</CustomButton>

</div>
);
};

const mapStateToProps = createStructuredSelector({
cartItems: selectCartItems,
});

//Connect passes dispatch to component as prop if we do not supply a 2nd argument to connect
export default withRouter(connect(mapStateToProps)(CartDropdown));
9 changes: 7 additions & 2 deletions src/components/cart-dropdown/Cart-Dropdown.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@
top: 90px;
right: 40px;
z-index: 5;
// overflow: hidden;

.empty-message {
font-size: 18px;
margin: 50px auto;
}

.cart-items {
height: 240px;
display: flex;
flex-direction: column;
// overflow: scroll;
overflow-y: scroll;
overflow-x: hidden;
}

button {
Expand Down
16 changes: 10 additions & 6 deletions src/components/cart-icon/CartIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,26 @@ import React from "react";
import { connect } from "react-redux";

import { toggleCartHidden } from "../../redux/cart/cart.actions";
import { selectCartItemsCount } from '../../redux/cart/cart.selectors';
import { createStructuredSelector } from 'reselect';

import { ReactComponent as ShoppingIcon } from "../../assets/shopping-bag.svg";

import "./CartIcon.styles.scss";

const CartIcon = ({ toggleCartHidden }) => (
const CartIcon = ({ toggleCartHidden, itemsCount }) => (
<div className="cart-icon" onClick={toggleCartHidden}>
<ShoppingIcon className="shopping-icon" />
<span className="item-count"> 0 </span>
<span className="item-count"> {itemsCount} </span>
</div>
);

const mapDispatchToProps = (dispatch) => ({
toggleCartHidden: () => dispatch(toggleCartHidden()),
});
export default connect(
null,
mapDispatchToProps
)(CartIcon);

const mapStateToProps = createStructuredSelector({
itemsCount: selectCartItemsCount
})

export default connect(mapStateToProps,mapDispatchToProps)(CartIcon);
17 changes: 17 additions & 0 deletions src/components/cart-item/CartItem.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';

import './CartItem.styles.scss';

const CartItem = ({ item: { imageUrl, name, price, quantity }}) => {
return (
<div className="cart-item">
<img src={imageUrl} alt='item'/>
<div className="item-details">
<span className="name">{name}</span>
<span className="price">{quantity} x ${price}</span>
</div>
</div>
)
}

export default CartItem;
23 changes: 23 additions & 0 deletions src/components/cart-item/CartItem.styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.cart-item {
width: 100%;
display: flex;
height: 80px;
margin-bottom: 15px;

img {
width: 30%;
}

.item-details {
width: 70%;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
padding: 10px 20px;

.name {
font-size: 16px;
}
}
}
36 changes: 36 additions & 0 deletions src/components/checkout-item/CheckoutItem.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from "react";
import { connect } from 'react-redux';
import { clearItem, removeItem, addItem } from '../../redux/cart/cart.actions'

import "./CheckoutItem.styles.scss";

const CheckoutItem = ({cartItem, clearItem, removeItem, addItem}) => {
const { name, imageUrl, price, quantity } = cartItem;
return (
<div className="checkout-item">
<div className="image-container">
<img alt="product" src={imageUrl} />
</div>

<span className="name">{name}</span>
<span className="quantity">

<div className="arrow" onClick={() => removeItem(cartItem)}>&#10094;</div>
<span className="value"> {quantity} </span>
<div className="arrow" onClick={() => addItem(cartItem)}>&#10095;</div>

</span>

<span className="price">{price}</span>
<div className="remove-button" onClick={() => clearItem(cartItem)}>&#10005;</div>
</div>
);
};

const mapDispatchToProps = dispatch => ({
clearItem: cartItem => dispatch(clearItem(cartItem)),
addItem: cartItem => dispatch(addItem(cartItem)),
removeItem: cartItem => dispatch(removeItem(cartItem))
})

export default connect(null, mapDispatchToProps)(CheckoutItem);
40 changes: 40 additions & 0 deletions src/components/checkout-item/CheckoutItem.styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.checkout-item {
width: 100%;
display: flex;
min-height: 100px;
border-bottom: 1px solid darkgrey;
padding: 15px 0;
font-size: 20px;
align-items: center;

.image-container {
width: 23%;
padding-right: 15px;

img {
width: 100%;
height: 100%;
}
}
.name,
.quantity,
.price {
width: 23%;
}

.quantity {
display: flex;

.arrow {
cursor: pointer;
}
.value {
margin: 0 10px;
}
}

.remove-button {
padding-left: 12px;
cursor: pointer;
}
}
16 changes: 12 additions & 4 deletions src/components/collection-item/CollectionItem.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import React from "react";
import { connect } from 'react-redux';
import { addItem } from '../../redux/cart/cart.actions';
import CustomButton from '../custom-button/CustomButton';
import "./CollectionItem.styles.scss";

const CollectionItem = ({ id, name, imageUrl, price }) => (
const CollectionItem = ({ item, addItem }) => {
const { name, imageUrl, price } = item;
return (
<div className="collection-item" >
<div
className="image"
Expand All @@ -14,8 +18,12 @@ const CollectionItem = ({ id, name, imageUrl, price }) => (
<span className="name">{name}</span>
<span className="price">{price}</span>
</div>
<CustomButton className="custom-button" inverted>Add to cart</CustomButton>
<CustomButton onClick={() => addItem(item)} className="custom-button" inverted>Add to cart</CustomButton>
</div>
);
)}

export default CollectionItem;
const mapDispatchToProps = (dispatch) => ({
addItem: item => dispatch(addItem(item))
})

export default connect(null, mapDispatchToProps)(CollectionItem);
Loading