forked from MarcTorrent/neal-react
/
app.jsx
29 lines (25 loc) · 928 Bytes
/
app.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React from "react";
import PropTypes from 'prop-types';
import { GoogleAnalytics, Segment, Stripe, Page, TypeformIntegration } from "./index";
export class App extends React.Component {
static propTypes = {
googleAnalyticsKey: PropTypes.string,
segmentKey: PropTypes.string,
stripeKey: PropTypes.string,
history: PropTypes.object,
};
render() {
const googleAnalyticsKey = this.props.googleAnalyticsKey;
const segmentKey = this.props.segmentKey;
const stripeKey = this.props.stripeKey;
const history = this.props.history;
return (
<div className="neal-app">
{ this.props.children }
{ googleAnalyticsKey ? <GoogleAnalytics account={googleAnalyticsKey} history={history} /> : null }
{ segmentKey ? <Segment writeKey={segmentKey} history={history} /> : null }
{ stripeKey ? <Stripe stripeKey={stripeKey}/> : null }
</div>
);
}
}