Skip to content

Commit

Permalink
Remove duplicate Main component from tax section
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle committed Mar 9, 2018
1 parent ad54360 commit b8d26d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { localize } from 'i18n-calypso';

/**
Expand All @@ -16,7 +15,6 @@ import ActionHeader from 'woocommerce/components/action-header';
import Card from 'components/card';
import ExternalLink from 'components/external-link';
import { getLink } from 'woocommerce/lib/nav-utils';
import Main from 'components/main';
import SettingsNavigation from '../navigation';

class SettingsTaxesTaxJar extends Component {
Expand All @@ -30,7 +28,7 @@ class SettingsTaxesTaxJar extends Component {
};

render = () => {
const { className, site, translate } = this.props;
const { site, translate } = this.props;

const breadcrumbs = [
<a href={ getLink( '/store/settings/:site/', site ) }>{ translate( 'Settings' ) }</a>,
Expand All @@ -43,7 +41,7 @@ class SettingsTaxesTaxJar extends Component {
const pluginUrl = getLink( '/plugins/taxjar-simplified-taxes-for-woocommerce/:site', site );

return (
<Main className={ classNames( 'settings-taxes', className ) } wideLayout>
<div>
<ActionHeader breadcrumbs={ breadcrumbs } />
<SettingsNavigation activeSection="taxes" />
<div>
Expand Down Expand Up @@ -83,7 +81,7 @@ class SettingsTaxesTaxJar extends Component {
</p>
</Card>
</div>
</Main>
</div>
);
};
}
Expand Down
8 changes: 3 additions & 5 deletions client/extensions/woocommerce/app/settings/taxes/taxes-wcs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import classNames from 'classnames';
import { connect } from 'react-redux';
import { localize } from 'i18n-calypso';

Expand All @@ -29,7 +28,6 @@ import ExtendedHeader from 'woocommerce/components/extended-header';
import { fetchTaxRates } from 'woocommerce/state/sites/meta/taxrates/actions';
import { fetchTaxSettings, updateTaxSettings } from 'woocommerce/state/sites/settings/tax/actions';
import { getLink } from 'woocommerce/lib/nav-utils';
import Main from 'components/main';
import { ProtectFormGuard } from 'lib/protect-form';
import QuerySettingsGeneral from 'woocommerce/components/query-settings-general';
import SettingsNavigation from '../navigation';
Expand Down Expand Up @@ -184,7 +182,7 @@ class SettingsTaxesWooCommerceServices extends Component {
};

render = () => {
const { className, loaded, siteId, siteSlug, translate } = this.props;
const { loaded, siteId, siteSlug, translate } = this.props;

const breadcrumbs = [
<a href={ getLink( '/store/settings/:site/', { slug: siteSlug } ) }>
Expand All @@ -194,7 +192,7 @@ class SettingsTaxesWooCommerceServices extends Component {
];

return (
<Main className={ classNames( 'settings-taxes', className ) } wideLayout>
<div>
<ActionHeader breadcrumbs={ breadcrumbs }>
<TaxSettingsSaveButton onSave={ this.onSave } />
</ActionHeader>
Expand All @@ -204,7 +202,7 @@ class SettingsTaxesWooCommerceServices extends Component {
{ loaded && this.renderRates() }
{ loaded && this.renderOptions() }
<ProtectFormGuard isChanged={ ! this.state.pristine } />
</Main>
</div>
);
};
}
Expand Down

0 comments on commit b8d26d8

Please sign in to comment.