Skip to content

Commit

Permalink
fix: remove withTheme from StripeForm
Browse files Browse the repository at this point in the history
to fix errors on deployed style guide
  • Loading branch information
aldeed committed Oct 11, 2018
1 parent ae4cb27 commit 876d6f9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions package/src/components/StripeForm/v1/StripeForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
PostalCodeElement,
injectStripe
} from "react-stripe-elements";
import styled, { withTheme } from "styled-components";
import styled from "styled-components";
import { withComponents } from "@reactioncommerce/components-context";
import { applyTheme, withStripeElements } from "../../../utils";

Expand Down Expand Up @@ -243,4 +243,8 @@ class StripeForm extends Component {
}
}

export default withTheme(withComponents(withStripeElements(injectStripe(StripeForm))));
// We should be using `withTheme` here, but it seems to cause serious errors in the
// deployed app, and does not work anyway. Need to investigate why `withComponents`
// works and does not cause errors but `withTheme` does not work. It is surely
// something related to the iframes that Stripe uses.
export default withComponents(withStripeElements(injectStripe(StripeForm)));

0 comments on commit 876d6f9

Please sign in to comment.