Skip to content

Commit 8d30b9b

Browse files
authored
Domain: Create new domain settings page stub (#58305)
* Create new domain settings page stub * Make background white and layout wide * Convert component to typescript
1 parent 10d3219 commit 8d30b9b

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

client/my-sites/domains/domain-management/controller.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,15 @@ export default {
8181
},
8282

8383
domainManagementEdit( pageContext, next ) {
84+
let component = DomainManagement.Edit;
8485
if ( config.isEnabled( 'domains/settings-page-redesign' ) ) {
85-
// TODO: set different component for the new domain settings page
86+
component = DomainManagement.Settings;
8687
}
8788
pageContext.primary = (
8889
<DomainManagementData
8990
analyticsPath={ domainManagementEdit( ':site', ':domain', pageContext.canonicalPath ) }
9091
analyticsTitle="Domain Management > Edit"
91-
component={ DomainManagement.Edit }
92+
component={ component }
9293
context={ pageContext }
9394
needsContactDetails
9495
needsDomains

client/my-sites/domains/domain-management/index.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import ListAll from './list/list-all';
1717
import ManageConsent from './manage-consent';
1818
import NameServers from './name-servers';
1919
import Security from './security';
20+
import Settings from './settings';
2021
import SiteRedirectSettings from './site-redirect';
2122
import Transfer from './transfer';
2223
import TransferOut from './transfer/transfer-out';
@@ -43,6 +44,7 @@ export default {
4344
SiteDomains,
4445
NameServers,
4546
Security,
47+
Settings,
4648
SiteRedirect,
4749
SiteRedirectSettings,
4850
TransferIn,
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { connect } from 'react-redux';
2+
import Main from 'calypso/components/main';
3+
import BodySectionCssClass from 'calypso/layout/body-section-css-class';
4+
import { getCurrentRoute } from 'calypso/state/selectors/get-current-route';
5+
import isDomainOnlySite from 'calypso/state/selectors/is-domain-only-site';
6+
7+
const Settings = (): JSX.Element => {
8+
return (
9+
<Main wideLayout>
10+
<BodySectionCssClass bodyClass={ [ 'edit__body-white' ] } />
11+
Page goes here.
12+
</Main>
13+
);
14+
};
15+
16+
export default connect( ( state, ownProps ) => {
17+
return {
18+
currentRoute: getCurrentRoute( state ),
19+
hasDomainOnlySite: isDomainOnlySite( state, ownProps.selectedSite.ID ),
20+
};
21+
} )( Settings );

0 commit comments

Comments
 (0)