Skip to content

Commit 1309cf2

Browse files
committed
Removing nested ternary
1 parent 8a12094 commit 1309cf2

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

components/Checkout/CheckoutForm.component.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import Billing from './Billing.component';
55
import OrderDetails from './OrderDetails.component';
66
import MobileOrderDetails from './MobileOrderDetails.component';
77
import LoadingSpinner from '../LoadingSpinner/LoadingSpinner.component';
8-
// TODO Add more payment methods
98

109
import { GET_CART } from 'utils/gql/GQL_QUERIES';
1110
import { CHECKOUT_MUTATION } from 'utils/gql/GQL_MUTATIONS';

components/Product/SingleProduct.component.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ const SingleProduct = ({ product }) => {
110110
)}
111111
<div className="pt-1 mt-2">
112112
{
113-
// Display default AddToCart button if we do not have variations. If we do, send the variationId to AddToCart button
113+
// Display default AddToCart button if we do not have variations.
114+
// If we do, send the variationId to AddToCart button
114115
}
115-
{product.variations ? (
116+
{product.variations && (
116117
<AddToCartButton product={selectedVariation} />
117-
) : (
118-
<AddToCartButton product={product} />
119118
)}
119+
{!product.variations && <AddToCartButton product={product} />}
120120
</div>
121121
</div>
122122
</div>

pages/produkter.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import client from 'utils/apollo/ApolloClient.js';
1414
* Shows an error if the server is down or unreachable.
1515
*/
1616
const Produkter = ({ products }) => {
17-
// TODO Stop hardcoding this value and do actual error checking
1817
const error = false;
1918

2019
return (

0 commit comments

Comments
 (0)