Skip to content

Commit

Permalink
Purchases: Update links to theme showcase
Browse files Browse the repository at this point in the history
* Point to the new showcase (`/design/${ domain }`) to select a theme for a site.
* Use the `getDetailsUrl()` helper from `lib/themes` for the theme details link.
  This way, the URL is guaranteed to remain correct once we re-wire that helper
  to point to the new showcase.
  • Loading branch information
ockham committed Feb 1, 2016
1 parent ff77938 commit 5d0299e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions client/me/purchases/cancel-purchase/product-information.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { domainManagementEdit } from 'my-sites/upgrades/paths';
import { googleAppsSettingsUrl } from 'lib/google-apps';
import Gridicon from 'components/gridicon';
import { isBusiness, isGoogleApps, isPlan, isTheme } from 'lib/products-values';
import { oldShowcaseUrl } from 'lib/themes/helpers';
import { getDetailsUrl as getThemeDetailsUrl } from 'lib/themes/helpers';

const CancelPurchaseProductInformation = React.createClass( {
propTypes: {
Expand Down Expand Up @@ -149,8 +149,8 @@ const CancelPurchaseProductInformation = React.createClass( {

renderThemeInformation() {
const { domain, meta, productName, siteName } = this.props.purchase,
themeDetailsUrl = `${ oldShowcaseUrl }${ domain }/${ meta }`,
themeSelectUrl = `${ oldShowcaseUrl }${ domain }`;
themeDetailsUrl = getThemeDetailsUrl( { id: meta }, { slug: domain } ),
themeSelectUrl = `/design/${ domain }`;

return (
<p>
Expand Down
4 changes: 2 additions & 2 deletions client/me/purchases/manage-purchase/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import HeaderCake from 'components/header-cake';
import Main from 'components/main';
import Notice from 'components/notice';
import NoticeAction from 'components/notice/notice-action';
import { oldShowcaseUrl } from 'lib/themes/helpers';
import { getDetailsUrl as getThemeDetailsUrl } from 'lib/themes/helpers';
import paths from '../paths';
import PaymentLogo from 'components/payment-logo';
import RemovePurchase from '../remove-purchase';
Expand Down Expand Up @@ -299,7 +299,7 @@ const ManagePurchase = React.createClass( {
}

if ( isTheme( purchase ) ) {
url = oldShowcaseUrl + purchase.domain + '/' + purchase.meta;
url = getThemeDetailsUrl( { id: purchase.meta }, { slug: purchase.domain } );
text = this.translate( 'Theme Details' );
}

Expand Down

0 comments on commit 5d0299e

Please sign in to comment.