mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
parent
c921bcc063
commit
bc7d42d928
@ -80,9 +80,10 @@ export class HomePage extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
openCurrentDocumentation = () => {
|
openCurrentDocumentation = () => {
|
||||||
const { currentDocVersion } = this.props;
|
const { currentDocVersion, prefix } = this.props;
|
||||||
|
const slash = prefix.startsWith('/') ? '' : '/';
|
||||||
|
|
||||||
return openWithNewTab(`/documentation/v${currentDocVersion}`);
|
return openWithNewTab(`${slash}${prefix}/v${currentDocVersion}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
shouldHideInput = inputName => {
|
shouldHideInput = inputName => {
|
||||||
@ -218,6 +219,7 @@ HomePage.defaultProps = {
|
|||||||
onConfirmDeleteDoc: () => {},
|
onConfirmDeleteDoc: () => {},
|
||||||
onSubmit: () => {},
|
onSubmit: () => {},
|
||||||
onUpdateDoc: () => {},
|
onUpdateDoc: () => {},
|
||||||
|
prefix: '/documentation',
|
||||||
versionToDelete: '',
|
versionToDelete: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -234,6 +236,7 @@ HomePage.propTypes = {
|
|||||||
onConfirmDeleteDoc: PropTypes.func,
|
onConfirmDeleteDoc: PropTypes.func,
|
||||||
onSubmit: PropTypes.func,
|
onSubmit: PropTypes.func,
|
||||||
onUpdateDoc: PropTypes.func,
|
onUpdateDoc: PropTypes.func,
|
||||||
|
prefix: PropTypes.string,
|
||||||
versionToDelete: PropTypes.string,
|
versionToDelete: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user