Fix broken links for share dialog and avatar images (#1249)

This commit is contained in:
Erik Michelson 2021-05-11 12:31:20 +02:00 committed by GitHub
parent afb6226d85
commit 327c872532
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 10 deletions

View file

@ -38,17 +38,17 @@ export const ShareModal: React.FC<ShareModalProps> = ({ show, onHide }) => {
titleI18nKey={ 'editor.modal.shareLink.title' }>
<Modal.Body>
<Trans i18nKey={ 'editor.modal.shareLink.editorDescription' }/>
<CopyableField content={ `${ baseUrl }/n/${ id }?${ editorMode }` } nativeShareButton={ true }
url={ `${ baseUrl }/n/${ id }?${ editorMode }` }/>
<CopyableField content={ `${ baseUrl }n/${ id }?${ editorMode }` } nativeShareButton={ true }
url={ `${ baseUrl }n/${ id }?${ editorMode }` }/>
<ShowIf condition={ noteFrontmatter.type === NoteType.SLIDE }>
<Trans i18nKey={ 'editor.modal.shareLink.slidesDescription' }/>
<CopyableField content={ `${ baseUrl }/p/${ id }` } nativeShareButton={ true }
url={ `${ baseUrl }/p/${ id }` }/>
<CopyableField content={ `${ baseUrl }p/${ id }` } nativeShareButton={ true }
url={ `${ baseUrl }p/${ id }` }/>
</ShowIf>
<ShowIf condition={ noteFrontmatter.type === '' }>
<Trans i18nKey={ 'editor.modal.shareLink.viewOnlyDescription' }/>
<CopyableField content={ `${ baseUrl }/s/${ id }` } nativeShareButton={ true }
url={ `${ baseUrl }/s/${ id }` }/>
<CopyableField content={ `${ baseUrl }s/${ id }` } nativeShareButton={ true }
url={ `${ baseUrl }s/${ id }` }/>
</ShowIf>
</Modal.Body>
</CommonModal>