Skip to content

Commit

Permalink
Blocks: link to Jetpack or wpcom support docs (#13902)
Browse files Browse the repository at this point in the history
  • Loading branch information
simison authored and kraftbj committed Nov 4, 2019
1 parent c26bee1 commit 96d06ee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
10 changes: 7 additions & 3 deletions extensions/blocks/markdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Fragment } from '@wordpress/element';
* Internal dependencies
*/
import './editor.scss';
import { isAtomicSite, isSimpleSite } from '../../shared/site-type-utils';
import edit from './edit';
import save from './save';

Expand All @@ -20,6 +21,11 @@ const exampleDescription = __(
'jetpack'
);

const supportLink =
isSimpleSite() || isAtomicSite()
? 'https://en.support.wordpress.com/markdown-quick-reference/'
: 'https://jetpack.com/support/jetpack-blocks/markdown-block/';

export const settings = {
title: __( 'Markdown', 'jetpack' ),

Expand All @@ -31,9 +37,7 @@ export const settings = {
'jetpack'
) }
</p>
<ExternalLink href="https://en.support.wordpress.com/markdown-quick-reference/">
{ __( 'Support reference', 'jetpack' ) }
</ExternalLink>
<ExternalLink href={ supportLink }>{ __( 'Support reference', 'jetpack' ) }</ExternalLink>
</Fragment>
),

Expand Down
12 changes: 8 additions & 4 deletions extensions/blocks/simple-payments/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import { Fragment } from '@wordpress/element';
/**
* Internal dependencies
*/
import { DEFAULT_CURRENCY } from './constants';
import { isAtomicSite, isSimpleSite } from '../../shared/site-type-utils';
import edit from './edit';
import save from './save';
import { DEFAULT_CURRENCY } from './constants';

/**
* Example image
Expand All @@ -24,6 +25,11 @@ import './editor.scss';

export const name = 'simple-payments';

const supportLink =
isSimpleSite() || isAtomicSite()
? 'https://support.wordpress.com/simple-payments/'
: 'https://jetpack.com/support/jetpack-blocks/simple-payments-block/';

export const settings = {
title: __( 'Simple Payments button', 'jetpack' ),

Expand All @@ -35,9 +41,7 @@ export const settings = {
'jetpack'
) }
</p>
<ExternalLink href="https://support.wordpress.com/simple-payments/">
{ __( 'Support reference', 'jetpack' ) }
</ExternalLink>
<ExternalLink href={ supportLink }>{ __( 'Support reference', 'jetpack' ) }</ExternalLink>
</Fragment>
),

Expand Down

0 comments on commit 96d06ee

Please sign in to comment.