Merge pull request woocommerce/woocommerce-admin#2602 from woocommerce/fix/2595
restore devdocs URLs after hash removal
This commit is contained in:
commit
f29627763a
|
@ -12,6 +12,7 @@ import { find, get } from 'lodash';
|
||||||
import ComponentExample from './example';
|
import ComponentExample from './example';
|
||||||
import ComponentDocs from './docs';
|
import ComponentDocs from './docs';
|
||||||
import { Card, Link } from '@woocommerce/components';
|
import { Card, Link } from '@woocommerce/components';
|
||||||
|
import { getAdminLink } from '@woocommerce/navigation';
|
||||||
import examples from './examples.json';
|
import examples from './examples.json';
|
||||||
import './style.scss';
|
import './style.scss';
|
||||||
|
|
||||||
|
@ -62,10 +63,16 @@ export default class extends Component {
|
||||||
component ? (
|
component ? (
|
||||||
componentName
|
componentName
|
||||||
) : (
|
) : (
|
||||||
<Link href={ `/devdocs/${ filePath }` }>{ componentName }</Link>
|
<Link href={ getAdminLink( `?page=wc-admin&path=/devdocs/${ filePath }` ) }>
|
||||||
|
{ componentName }
|
||||||
|
</Link>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
action={ component ? <Link href={ '/devdocs' }>Full list</Link> : null }
|
action={
|
||||||
|
component ? (
|
||||||
|
<Link href={ getAdminLink( '?page=wc-admin&path=/devdocs' ) }>Full list</Link>
|
||||||
|
) : null
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<ComponentExample
|
<ComponentExample
|
||||||
asyncName={ componentName }
|
asyncName={ componentName }
|
||||||
|
|
Loading…
Reference in New Issue