Skip to content

Commit

Permalink
Domain: Create new domain settings page stub (#58305)
Browse files Browse the repository at this point in the history
* Create new domain settings page stub

* Make background white and layout wide

* Convert component to typescript
  • Loading branch information
leonardost authored Dec 7, 2021
1 parent 10d3219 commit 8d30b9b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/my-sites/domains/domain-management/controller.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,15 @@ export default {
},

domainManagementEdit( pageContext, next ) {
let component = DomainManagement.Edit;
if ( config.isEnabled( 'domains/settings-page-redesign' ) ) {
// TODO: set different component for the new domain settings page
component = DomainManagement.Settings;
}
pageContext.primary = (
<DomainManagementData
analyticsPath={ domainManagementEdit( ':site', ':domain', pageContext.canonicalPath ) }
analyticsTitle="Domain Management > Edit"
component={ DomainManagement.Edit }
component={ component }
context={ pageContext }
needsContactDetails
needsDomains
Expand Down
2 changes: 2 additions & 0 deletions client/my-sites/domains/domain-management/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import ListAll from './list/list-all';
import ManageConsent from './manage-consent';
import NameServers from './name-servers';
import Security from './security';
import Settings from './settings';
import SiteRedirectSettings from './site-redirect';
import Transfer from './transfer';
import TransferOut from './transfer/transfer-out';
Expand All @@ -43,6 +44,7 @@ export default {
SiteDomains,
NameServers,
Security,
Settings,
SiteRedirect,
SiteRedirectSettings,
TransferIn,
Expand Down
21 changes: 21 additions & 0 deletions client/my-sites/domains/domain-management/settings/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { connect } from 'react-redux';
import Main from 'calypso/components/main';
import BodySectionCssClass from 'calypso/layout/body-section-css-class';
import { getCurrentRoute } from 'calypso/state/selectors/get-current-route';
import isDomainOnlySite from 'calypso/state/selectors/is-domain-only-site';

const Settings = (): JSX.Element => {
return (
<Main wideLayout>
<BodySectionCssClass bodyClass={ [ 'edit__body-white' ] } />
Page goes here.
</Main>
);
};

export default connect( ( state, ownProps ) => {
return {
currentRoute: getCurrentRoute( state ),
hasDomainOnlySite: isDomainOnlySite( state, ownProps.selectedSite.ID ),
};
} )( Settings );

0 comments on commit 8d30b9b

Please sign in to comment.