Skip to content

Commit

Permalink
Change installation page URL
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasfoo committed Feb 16, 2021
1 parent 164c52f commit 6897d1b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion client/my-sites/woocommerce/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function checkPrerequisites( context, next ) {
export function setup( context, next ) {
// Invalid site, redirect to select site.
if ( ! getSiteFragment( context.path ) ) {
return page.redirect( '/woocommerce' );
return page.redirect( '/woocommerce-installation' );
}

context.primary = React.createElement( main );
Expand Down
11 changes: 9 additions & 2 deletions client/my-sites/woocommerce/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ import { checkPrerequisites, setup } from './controller';
import './style.scss';

export default function ( router ) {
router( '/woocommerce', siteSelection, sites, makeLayout );
router( '/woocommerce/:site', siteSelection, navigation, checkPrerequisites, setup, makeLayout );
router( '/woocommerce-installation', siteSelection, sites, makeLayout );
router(
'/woocommerce-installation/:site',
siteSelection,
navigation,
checkPrerequisites,
setup,
makeLayout
);
}
6 changes: 3 additions & 3 deletions client/sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,10 @@ const sections = [
group: 'jetpack-cloud',
},
{
name: 'woocommerce',
paths: [ '/woocommerce' ],
name: 'woocommerce-installation',
paths: [ '/woocommerce-installation' ],
module: 'calypso/my-sites/woocommerce',
group: 'woocommerce',
group: 'woocommerce-installation',
},
];

Expand Down

0 comments on commit 6897d1b

Please sign in to comment.