Skip to content

Commit

Permalink
fix: blank share url in share dialog [PT-188104620] (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
kswenson authored Aug 27, 2024
1 parent 73b0cbb commit d05967b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@concord-consortium/cloud-file-manager",
"description": "Wrapper for providing file management for web applications",
"author": "The Concord Consortium",
"version": "2.0.0-pre.3",
"version": "2.0.0-pre.4",
"repository": {
"type": "git",
"url": "https://github.com/concord-consortium/cloud-file-manager"
Expand Down
12 changes: 7 additions & 5 deletions src/code/views/share-dialog-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,23 +240,25 @@ export default class ShareDialogView extends React.Component<IShareDialogProps,

render() {
const { isShared } = this.props
const { isLoadingShared, link } = this.state
const sharing = isShared || (link != null)
const { isLoadingShared } = this.state
const shareUrl = this.getShareLink()
const embedUrl = this.getEmbed()
const sharing = isShared || (shareUrl != null)
return (
<ModalDialogView title={translate('~DIALOG.SHARED')} close={this.props.close}>
<div className='share-dialog' data-testid='share-dialog'>
<div className='share-top-dialog'>
{isLoadingShared
? <ShareLoadingView />
: <ShareDialogStatusView isSharing={sharing} previewLink={this.state.link}
: <ShareDialogStatusView isSharing={sharing} previewLink={shareUrl}
onToggleShare={this.toggleShare} onUpdateShare={this.updateShare}/>}
</div>

{sharing &&
<ShareDialogTabsView
tabSelected={this.state.tabSelected}
linkUrl={this.state.link}
embedUrl={this.state.embed}
linkUrl={shareUrl}
embedUrl={embedUrl}
interactiveApi={this.props.enableLaraSharing
? {
linkUrl: this.getInteractiveApiLink(),
Expand Down

0 comments on commit d05967b

Please sign in to comment.