@@ -6,21 +6,20 @@ import { connect } from "react-redux";
66import { IAppStore } from "reducers" ;
77import { checkAuth , IUser } from "modules/auth" ;
88import { Link } from "react-router-dom" ;
9- import PricingTable , { Plan } from "components/blocks/PricingTable" ;
10- import { push , LocationAction } from "react-router-redux" ;
119import ProductIntro from "components/blocks/ProductIntro" ;
1210import WhyUs from "components/blocks/WhyUs" ;
1311import SupportedLinters from "components/blocks/SupportedLinters" ;
1412import WhyDoYouNeedIt from "components/blocks/WhyDoYouNeedIt" ;
1513import Customers from "components/blocks/Customers" ;
14+ import AllPricingPlans from "components/blocks/AllPricingPlans" ;
15+ import Security from "components/blocks/Security" ;
1616
1717interface IStateProps {
1818currentUser ?:IUser ;
1919}
2020
2121interface IDispatchProps {
2222checkAuth ( ) :void ;
23- push :LocationAction ;
2423}
2524
2625interface IProps extends IStateProps , IDispatchProps { }
@@ -82,36 +81,8 @@ class Home extends React.Component<IProps> {
8281return < ProductIntro showLinkOnMoreDetails /> ;
8382}
8483
85- private onPricingPlanChoose ( chosenPlan :Plan ) {
86- if ( chosenPlan === Plan . Enterprise ) {
87- window . location . replace ( `mailto:denis@golangci.com` ) ;
88- return ;
89- }
90-
91- if ( ! this . props . currentUser ) {
92- window . location . replace ( `${ API_HOST } /v1/auth/github` ) ;
93- return ;
94- }
95-
96- this . props . push ( "/repos/github" ) ;
97- }
98-
9984private renderPricingSection ( ) {
100- return (
101- < section className = "home-section-gradient home-section" >
102- < div className = "home-section-content" >
103- < Row type = "flex" justify = "center" >
104- < p id = "pricing" className = "home-section-header home-section-gradient-header" > Pricing</ p >
105- </ Row >
106-
107- < PricingTable
108- authorized = { this . props . currentUser ?true :false }
109- onButtonClick = { this . onPricingPlanChoose . bind ( this ) }
110- />
111-
112- </ div >
113- </ section >
114- ) ;
85+ return < AllPricingPlans showLinkOnMoreDetails /> ;
11586}
11687
11788private renderWhyUsSection ( ) {
@@ -155,6 +126,10 @@ class Home extends React.Component<IProps> {
155126return < Customers /> ;
156127}
157128
129+ private renderSecuritySection ( ) {
130+ return < Security /> ;
131+ }
132+
158133public render ( ) {
159134return (
160135< >
@@ -167,6 +142,7 @@ class Home extends React.Component<IProps> {
167142{ this . renderCustomersSection ( ) }
168143{ this . renderLearnMore ( ) }
169144{ this . renderPricingSection ( ) }
145+ { this . renderSecuritySection ( ) }
170146</ >
171147) ;
172148}
@@ -178,7 +154,6 @@ const mapStateToProps = (state: IAppStore): any => ({
178154
179155const mapDispatchToProps = {
180156 checkAuth,
181- push,
182157} ;
183158
184159export default connect < IStateProps , IDispatchProps , void > ( mapStateToProps , mapDispatchToProps ) ( Home ) ;