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
import React, { useState, useEffect} from 'react'; | |
import "rbx/index.css"; | |
import { Button, Container, Message, Title } from "rbx"; | |
import firebase from 'firebase/app'; | |
import 'firebase/auth'; | |
import 'firebase/database'; | |
import StyledFirebaseAuth from 'react-firebaseui/StyledFirebaseAuth'; | |
const terms = { F: 'Fall', W: 'Winter', S: 'Spring'}; | |
const days = ['M', 'Tu', 'W', 'Th', 'F']; |
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
import React from 'react'; | |
const App = ({products}) => { | |
const skus = Object.keys(products); | |
const items = skus.map(sku => <li>{products[sku].title}</li>); | |
return <ul>{items}</ul>; | |
}; | |
export default App; |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import App from './App'; | |
import * as serviceWorker from './serviceWorker'; | |
fetch('./data/products.json') | |
.then(resp => resp.json()) | |
.then(({products}) => { | |
ReactDOM.render(<App products={products} />, document.getElementById('root')); | |
}); |
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
{ | |
"12064273040195392": { | |
"S": 0, | |
"M": 3, | |
"L": 1, | |
"XL": 2 | |
}, | |
"51498472915966370": { | |
"S": 0, | |
"M": 2, |
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
{ | |
"12064273040195392": { | |
"sku": 12064273040195392, | |
"title": "Cat Tee Black T-Shirt", | |
"description": "4 MSL", | |
"style": "Black with custom print", | |
"price": 10.9, | |
"currencyId": "USD", | |
"currencyFormat": "$", | |
"isFreeShipping": true |