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

Cleaning up #102

Merged
merged 7 commits into from
Jan 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 42 additions & 42 deletions app/components/About.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,46 @@ import React, { Component } from 'react';
import { Link } from 'react-router';

export default class About extends Component {
render() {
return (
<div className="about">
<ol className="breadcrumb">
<li><Link to="/">Home</Link></li>
<li className="active">About</li>
</ol>

<section className="container-fluid">
<div className="row">
<div className="col-xs-12 col-md-8 col-md-offset-2">
<div className="container-fluid">
<div className="row">
<div className="col-xs-12 col-md-6">
<img src="https://cdn.shopify.com/s/files/1/0236/9929/files/FlagshipPage_77a3707e-1360-4cf4-b667-50f1408c0780.png?16534521691931141188" alt="New York Office"/>
<h3>New York</h3>
<h5>5 Hanover Street | Financial District</h5>
<h5>504-407-2925</h5>
<h5>Monday - Wednesday: 10AM - 7PM</h5>
<h5>Thursday - Sunday: 10AM - 8PM</h5>
</div>
<div className="col-xs-12 col-md-6">
<img src="https://cdn.shopify.com/s/files/1/0236/9929/files/Savannah.png?67863585231748543455" alt="San Francisco" />
<h3>San Francisco</h3>
<h5>809 Royal Street | Historic District</h5>
<h5>912-495-5676</h5>
<h5>Monday - Wednesday: 10AM - 7PM</h5>
<h5>Thursday - Sunday: 10AM - 8PM</h5>
</div>
<div className="col-xs-12">
<h3>About Online Bling</h3>
<h5>KREWE's first flagship opened August 30, 2015 at 809 Royal Street, in New Orleans' French Quarter. The store is housed in a building dating to the late 19th century, with the historic Jackson Square and St. Louis Cathedral located around the corner. The store includes a small plant gallery, espresso bar, and adjoining courtyard seating. At the heart of the space is the Sun Room, which showcases KREWE's signature modern iconic eyewear. Frames can be individually fitted for optimum comfort and style in the custom fitting area. KREWE's flagship is about a mix of the old and the new, the iconic and the modern. It re-envisions the traditional New Orleans retail experience while celebrating the individual style of the city and its visitors.</h5>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
)
}
render() {
return (
<div className="about">
<ol className="breadcrumb">
<li><Link to="/">Home</Link></li>
<li className="active">About</li>
</ol>
<section className="container-fluid">
<div className="row">
<div className="col-xs-12 col-md-8 col-md-offset-2">
<div className="container-fluid">
<div className="row">
<div className="col-xs-12 col-md-6">
<img src="https://cdn.shopify.com/s/files/1/0236/9929/files/FlagshipPage_77a3707e-1360-4cf4-b667-50f1408c0780.png?16534521691931141188" alt="New York Office" />
<h3>New York</h3>
<h5>5 Hanover Street | Financial District</h5>
<h5>504-407-2925</h5>
<h5>Monday - Wednesday: 10AM - 7PM</h5>
<h5>Thursday - Sunday: 10AM - 8PM</h5>
</div>
<div className="col-xs-12 col-md-6">
<img src="https://cdn.shopify.com/s/files/1/0236/9929/files/Savannah.png?67863585231748543455" alt="San Francisco" />
<h3>San Francisco</h3>
<h5>809 Royal Street | Historic District</h5>
<h5>912-495-5676</h5>
<h5>Monday - Wednesday: 10AM - 7PM</h5>
<h5>Thursday - Sunday: 10AM - 8PM</h5>
</div>
<div className="col-xs-12">
<h3>About Online Bling</h3>
<h5>
KREWE's first flagship opened August 30, 2015 at 809 Royal Street, in the New Orleans French Quarter. The store is housed in a building dating to the late 19th century, with the historic Jackson Square and St. Louis Cathedral located around the corner. The store includes a small plant gallery, espresso bar, and adjoining courtyard seating. At the heart of the space is the Sun Room, which showcases KREWE's signature modern iconic eyewear. Frames can be individually fitted for optimum comfort and style in the custom fitting area. KREWEs flagship is about a mix of the old and the new, the iconic and the modern. It re-envisions the traditional New Orleans retail experience while celebrating the individual style of the city and its visitors.
</h5>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
);
}
}

23 changes: 10 additions & 13 deletions app/components/Categories.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { Component } from 'react';
import { Router, Route, Link, browserHistory } from 'react-router'
import {render} from 'react-dom'
import { receiveCategories } from '../action-creators/categories'
import { Navbar, Nav, NavDropdown, NavItem, MenuItem } from 'react-bootstrap'
import { Router, Route, Link, browserHistory } from 'react-router';
import { render } from 'react-dom';
import { receiveCategories } from '../action-creators/categories';
import { Navbar, Nav, NavDropdown, NavItem, MenuItem } from 'react-bootstrap';

export class Categories extends Component {
constructor(props) {
Expand All @@ -16,16 +16,14 @@ export class Categories extends Component {
<NavDropdown eventKey={1} title="SHOP" id="categories-dropdown">
{this.props.categories.rootList.map(category => {
return (

<MenuItem key={category.id} onClick={(e)=>(browserHistory.push(`/products/category/${category.name}`))}>
<MenuItem key={category.id} onClick={(e) => (browserHistory.push(`/products/category/${category.name}`))}>
{ category.name }
</MenuItem>

)
);
})
}
</NavDropdown>
)
);
}
}

Expand All @@ -34,11 +32,10 @@ export class Categories extends Component {
import { connect } from 'react-redux';

const mapStateToProps = (state, ownProps) => {
console.log(ownProps)
return {
categories: state.categories,
location: ownProps.location
}
categories: state.categories,
location: ownProps.location
};
};

export default connect(
Expand Down
24 changes: 12 additions & 12 deletions app/components/Checkout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export default class Checkout extends Component {
country: target.billingCountry.value,
zipcode: target.billingZipcode.value
};
// cardType: target.cardType.value,
// cardNumber: target.cardNumber.value
// cardType: target.cardType.value,
// cardNumber: target.cardNumber.value
this.props.confirmCheckout(shippingAddress, billingAddress);

}
Expand All @@ -41,11 +41,11 @@ export default class Checkout extends Component {
console.log("THIS>PROPS", this.props);
return (
<div className="order-confirmation">
<ol className="breadcrumb">
<li><Link to="/">Home</Link></li>
<li className="active">Order Confirmation</li>
</ol>
<section className="cart-list container-fluid">
<ol className="breadcrumb">
<li><Link to="/">Home</Link></li>
<li className="active">Order Confirmation</li>
</ol>
<section className="cart-list container-fluid">
<div className="row">
<div className="col-xs-12">
<div className="container-fluid">
Expand Down Expand Up @@ -135,9 +135,9 @@ export default class Checkout extends Component {
</div>
</div>
<div className="row">
<Link to="/">
<button type="submit" className="submit">Confirm Order</button>
</Link>
<Link to="/">
<button type="submit" className="submit">Confirm Order</button>
</Link>
</div>
</form>
</div>
Expand All @@ -147,9 +147,9 @@ export default class Checkout extends Component {
</div>
</div>
</section>
</div>
</div>



);
}
}
40 changes: 20 additions & 20 deletions app/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,38 @@ import Categories from './Categories';

export default class Footer extends Component {
constructor(props){
super(props);
super(props);
this.onFormSubmit = this.onFormSubmit.bind(this);
}
onFormSubmit(event) {
event.preventDefault();

// var subscriptionEmail = this.refs.subscriptionEmail.value;
// Need to build subscription database model and link it to user database model
// So that inputted email will be saved in our database.
var subscriptionEmail = event.target.subscriptionEmail.value
if(subscriptionEmail.length > 0) {
console.log('Entering')
console.log(typeof(subscriptionEmail));
if(!subscriptionEmail.includes("@")) {
onFormSubmit(event) {
event.preventDefault();

// var subscriptionEmail = this.refs.subscriptionEmail.value;
// Need to build subscription database model and link it to user database model
// So that inputted email will be saved in our database.
var subscriptionEmail = event.target.subscriptionEmail.value;
if (subscriptionEmail.length > 0) {
// console.log('Entering');
// console.log(typeof subscriptionEmail);
if (!subscriptionEmail.includes("@")) {
window.alert('Please enter valid email address')
event.target.subscriptionEmail.value = '';
} else {
window.alert('Thank you for your subscription ' + subscriptionEmail + '!');
event.target.subscriptionEmail.value = '';
}
}
}
}

render() {
console.log('Footer props', this.props);
return (
render() {
console.log('Footer props', this.props);
return (
<div className="footer container-fluid">
<div className="row">
<div className="col-xs-6 col-lg-4">
<h4><strong>SHOP</strong></h4>
<Categories/>
<Categories />
</div>
<div className="col-xs-6 col-lg-4">
<h4><strong>NEED HELP?</strong></h4>
Expand Down Expand Up @@ -70,13 +71,12 @@ export default class Footer extends Component {
<Link><i className="fa fa-instagram" aria-hidden="true"></i></Link>
<Link><i className="fa fa-pinterest-p" aria-hidden="true"></i></Link>
</div>

</div>
</div>
<div className="row">
<div className="col-xs-12 text-center">ONLINE BLING® is registered trademarks of , Drake Shits Gold LLC</div>
<div className="col-xs-12 text-center">ONLINE BLING® is registered trademarks of Drake LLC</div>
</div>
</div>
);
}
);
}
}
48 changes: 23 additions & 25 deletions app/components/Homepage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,29 @@ import { Link } from 'react-router';
import Products from './Products';

const Home = (props) => {
console.log('#####', props)
return(
<div className="home">

<div className="image-slide">
<div className="image-info">

</div>
</div>


<Products products={props.products}/>

<section className="container-fluid promo-wrapper">
<div className="row">
<div className="col-xs-12 col-lg-6 our-story">
<Link href="/about"> <span>OUR STORY</span> </Link>
</div>
<div className="col-xs-12 col-lg-6 new-arrival">
<Link href="/products/category/New%20Arrivals"> <span>SHOP ARRIVALS</span> </Link>
</div>
</div>
</section>
</div>
)};
return (
<div className="home">

<div className="image-slide">
<div className="image-info">
</div>
</div>

<Products products={props.products} />

<section className="container-fluid promo-wrapper">
<div className="row">
<div className="col-xs-12 col-lg-6 our-story">
<Link href="/about"> <span>OUR STORY</span> </Link>
</div>
<div className="col-xs-12 col-lg-6 new-arrival">
<Link href="/products/category/New%20Arrivals"> <span>SHOP ARRIVALS</span> </Link>
</div>
</div>
</section>
</div>
);
};

const mapState = ({ products }) => ({ products: products.list });

Expand Down
45 changes: 23 additions & 22 deletions app/components/Profile.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { connect } from 'react-redux';
import { Link } from 'react-router';
import { removeItem, updateQuantity } from '../action-creators/cart';

class UserProfile extends React.Component {
Expand All @@ -13,34 +14,34 @@ class UserProfile extends React.Component {
componentWillUpdate(nextProps, nextState) {
console.log(componentWillUpdate, nextProps, nextState)
}
handleOnSubmit(e){
handleOnSubmit(e) {
e.preventDefault()
console.log('update user information')
}
render(){
return (
<div className="user-profile">
<ol className="breadcrumb">
<li><Link to="/">Home</Link></li>
<li className="active">User Profile</li>
</ol>
<section className="user-info container-fluid">
<div className="row">
<form onSubmit={(e)=>(this.handleOnSubmit(e))}>
<div className="form-group">
<label>Name</label>
<input type="text" name="name" className="form-control" />
</div>
<div className="form-group">
<label>Email</label>
<input type="email" name="email" className="form-control" />
</div>
<button type="submit">Submit</button>
</form>
</div>
</section>
</div>
)
<ol className="breadcrumb">
<li><Link to="/">Home</Link></li>
<li className="active">User Profile</li>
</ol>
<section className="user-info container-fluid">
<div className="row">
<form onSubmit={(e) => (this.handleOnSubmit(e))}>
<div className="form-group">
<label>Name</label>
<input type="text" name="name" className="form-control" />
</div>
<div className="form-group">
<label>Email</label>
<input type="email" name="email" className="form-control" />
</div>
<button type="submit">Submit</button>
</form>
</div>
</section>
</div>
);
}
}

Expand Down
Loading