Skip to content

Commit df32618

Browse files
committed
Merge branch 'master' of github.com:ReactTraining/react-workshop
2 parents d6f1307 + aa3f36b commit df32618

File tree

94 files changed

+1823
-1033
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1823
-1033
lines changed

apps/YesterTech/AuthState.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const AuthStateContext = React.createContext()
44

55
const initialState = {
66
authenticated: false,
7-
user: null,
7+
user: null
88
}
99

1010
export function AuthStateProvider({ children }) {
@@ -23,7 +23,7 @@ export function AuthStateProvider({ children }) {
2323

2424
const value = {
2525
...state,
26-
dispatch: useCallback(dispatch, []),
26+
dispatch: useCallback(dispatch, [])
2727
}
2828

2929
return <AuthStateContext.Provider value={value} children={children} />

apps/YesterTech/BrowseProductItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function BrowseProductItem({
1919
condition = 'n/a',
2020
brand = 'n/a',
2121
category = 'n/a',
22-
rating,
22+
rating
2323
}) {
2424
// Cart
2525
const { addToCart, updateQuantity, getQuantity } = useShoppingCart()

apps/YesterTech/Centered.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Centered({ as: Component = 'div', size = 30, children, ...rest }) {
55
<Component
66
style={{
77
margin: `0 auto`,
8-
maxWidth: `${size}rem`,
8+
maxWidth: `${size}rem`
99
}}
1010
{...rest}
1111
>

apps/YesterTech/Checkout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function Checkout() {
2424
},
2525
{
2626
sameAsBilling: false,
27-
fields: {},
27+
fields: {}
2828
}
2929
)
3030

apps/YesterTech/CheckoutBilling.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function CheckoutBilling({ onSubmit, defaultSameAsBilling = false, defaultFields
3030
shippingAddress: defaultFields.shippingAddress || '',
3131
shippingCity: defaultFields.shippingCity || '',
3232
shippingState: defaultFields.shippingState || '',
33-
shippingPostal: defaultFields.shippingPostal || '',
33+
shippingPostal: defaultFields.shippingPostal || ''
3434
}
3535
)
3636

@@ -45,7 +45,7 @@ function CheckoutBilling({ onSubmit, defaultSameAsBilling = false, defaultFields
4545
shippingAddress,
4646
shippingCity,
4747
shippingState,
48-
shippingPostal,
48+
shippingPostal
4949
} = state
5050

5151
function handleSubmit(event) {
@@ -60,7 +60,7 @@ function CheckoutBilling({ onSubmit, defaultSameAsBilling = false, defaultFields
6060
shippingAddress: sameAsBilling ? billingAddress : shippingAddress,
6161
shippingCity: sameAsBilling ? billingCity : shippingCity,
6262
shippingState: sameAsBilling ? billingState : shippingState,
63-
shippingPostal: sameAsBilling ? billingPostal : shippingPostal,
63+
shippingPostal: sameAsBilling ? billingPostal : shippingPostal
6464
}
6565
onSubmit(sameAsBilling, fields)
6666
}

apps/YesterTech/Heading.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function Heading({ as: Component = 'h1', size = 1, className, ...rest }) {
1010

1111
Heading.propTypes = {
1212
size: PropTypes.number,
13-
as: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']),
13+
as: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6'])
1414
}
1515

1616
export default Heading

apps/YesterTech/Notice.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function Notice({ children, type = 'error' }) {
99
}
1010

1111
Notice.propTypes = {
12-
type: PropTypes.oneOf(['error', 'success']),
12+
type: PropTypes.oneOf(['error', 'success'])
1313
}
1414

1515
export default Notice

apps/YesterTech/Pagination.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function Pagination({
2525
.map((_, i) => {
2626
const newQuery = queryString.stringify({
2727
...query,
28-
page: i + 1,
28+
page: i + 1
2929
})
3030
const active = page === i + 1
3131
return (
@@ -46,7 +46,7 @@ Pagination.propTypes = {
4646
path: PropTypes.string.isRequired,
4747
totalResults: PropTypes.number.isRequired,
4848
page: PropTypes.number.isRequired,
49-
resultsPerPage: PropTypes.number.isRequired,
49+
resultsPerPage: PropTypes.number.isRequired
5050
}
5151

5252
export function PaginationRange({ resultsPerPage, page, totalResults, query }) {
@@ -72,5 +72,5 @@ PaginationRange.propTypes = {
7272
totalResults: PropTypes.number.isRequired,
7373
page: PropTypes.number.isRequired,
7474
resultsPerPage: PropTypes.number.isRequired,
75-
query: PropTypes.string,
75+
query: PropTypes.string
7676
}

apps/YesterTech/ProductFilterItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function ProductFilterItem({ children, item, onChange, selected = false }) {
2020
}
2121

2222
ProductFilterItem.propTypes = {
23-
onChange: PropTypes.func,
23+
onChange: PropTypes.func
2424
}
2525

2626
export default ProductFilterItem

apps/YesterTech/ProductFilterList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function ProductFilterList({ urlKey, list, label }) {
2323
const newSearch = {
2424
...search,
2525
page: undefined,
26-
[urlKey]: newSelected.length ? newSelected.join(',') : undefined,
26+
[urlKey]: newSelected.length ? newSelected.join(',') : undefined
2727
}
2828
history.push(`${location.pathname}?${queryString.stringify(newSearch)}`)
2929
}

0 commit comments

Comments
 (0)