Created
November 19, 2020 20:40
-
-
Save seand7565/1f47e9c90abebbf4f5c358f3a0cf7c71 to your computer and use it in GitHub Desktop.
Don't Panic - The Solidus Guide to ReactJS Chat Log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2020-09-23 18:02:16 UTC Sean Denny https://github.com/seand7565/solidus-store | |
2020-09-23 18:03:13 UTC Sean Denny https://www.youtube.com/watch?v=WbWmFtP2bDs | |
2020-09-23 18:09:49 UTC Sean Denny gem 'react-rails' | |
2020-09-23 18:10:33 UTC Sean Denny rails webpacker:install | |
2020-09-23 18:11:06 UTC Sean Denny rails webpacker:install:react | |
2020-09-23 18:11:37 UTC Sean Denny rails generate react:install | |
2020-09-23 18:14:19 UTC Sean Denny https://github.com/solidusio/solidus/tree/master/frontend/app/views/spree/products | |
2020-09-23 18:15:30 UTC Sean Denny <%= javascript_pack_tag 'application' %> | |
2020-09-23 18:17:55 UTC Sean Denny https://gist.github.com/seand7565/8bfbcebc82472af7bd993ac71715166a | |
2020-09-23 18:19:44 UTC Sean Denny <%= react_component("Products/Show") %> | |
2020-09-23 18:24:43 UTC Sean Denny import CartForm from "./CartForm"; | |
2020-09-23 18:24:54 UTC Sean Denny import Image from "./Image"; | |
2020-09-23 18:25:05 UTC Sean Denny import Properties from "./Properties"; | |
2020-09-23 18:25:16 UTC Sean Denny import Taxons from "./Taxons"; | |
2020-09-23 18:25:27 UTC Sean Denny import Thumbnails from "./Thumbnails"; | |
2020-09-23 18:31:27 UTC Sean Denny getProduct = () => {} | |
2020-09-23 18:32:44 UTC Sean Denny componentDidMount(){} | |
2020-09-23 18:33:19 UTC Sean Denny fetch(“/api” + this.state.path).then(response => response.json()).then(response => { console.log(response) }) | |
2020-09-23 18:35:43 UTC Sean Denny this.setState({ name: response.name, description: response.description }) | |
2020-09-23 18:42:08 UTC Sean Denny taxons: response.classifications.map((classification) => classification.taxon) | |
2020-09-23 18:43:38 UTC Sean Denny https://github.com/solidusio/solidus/blob/master/frontend/app/views/spree/products/_taxons.html.erb | |
2020-09-23 18:45:32 UTC Sean Denny if(this.props.taxons.length == 0){ return null } else { | |
2020-09-23 18:46:57 UTC Sean Denny {this.props.taxons.map((taxon, index) => )} | |
2020-09-23 18:50:10 UTC Sean Denny https://github.com/solidusio/solidus/blob/master/frontend/app/views/spree/products/_properties.html.erb | |
2020-09-23 18:51:53 UTC Sean Denny if(this.props.properties.length == 0){ return null } else {} | |
2020-09-23 18:52:53 UTC Sean Denny { this.props.properties.map((property, index) => )} | |
2020-09-23 18:54:17 UTC Sean Denny <tr class={index % 2 == 0 ? "even" : "odd"} key={index}> | |
2020-09-23 18:57:20 UTC Sean Denny image: response.master.images[0].product_url | |
2020-09-23 18:58:08 UTC Sean Denny <img src={this.props.image} /> | |
2020-09-23 19:00:16 UTC Sean Denny thumbnails: response.master.images.map(image => ({ id: image.id, mini_url: image.mini_url, product_url: image.product_url}) ) | |
2020-09-23 19:01:51 UTC Sean Denny https://github.com/solidusio/solidus/blob/master/frontend/app/views/spree/products/_thumbnails.html.erb | |
2020-09-23 19:03:00 UTC Sean Denny if(this.props.thumbnails.length < 2){ return null } else{ | |
2020-09-23 19:04:05 UTC Sean Denny {this.props.thumbnails.map((thumnail, index) => )} | |
2020-09-23 19:09:53 UTC Sean Denny changeImage = (id) => {} | |
2020-09-23 19:10:33 UTC Sean Denny var thumbnail = this.state.thumbnails.filter(image => image.id == id)[0] | |
2020-09-23 19:12:44 UTC Sean Denny <a href="javascript:;" onClick={() => this.props.changeImage(thumbnail.id)}> | |
2020-09-23 19:15:24 UTC Sean Denny https://github.com/solidusio/solidus/blob/master/frontend/app/views/spree/products/_cart_form.html.erb | |
2020-09-23 19:19:44 UTC Sean Denny <form action="/orders/populate" method="post"> </form> | |
2020-09-23 19:20:21 UTC Sean Denny <input type="number" className="title" name="quantity" min={1} defaultValue={1} /> | |
2020-09-23 19:20:59 UTC Sean Denny <input type="hidden" name="variant_id" value={this.props.id} /> | |
2020-09-23 19:21:37 UTC Sean Denny <button className="large primary" id="add-to-cart-button" type="submit"> Add To Cart </button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment