Skip to content

Commit

Permalink
trying to fix uploading 1
Browse files Browse the repository at this point in the history
  • Loading branch information
someCatInTheWorld committed Jun 16, 2024
1 parent c501dbb commit b104992
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/components/menu-bar/share-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,23 @@ class ShareButton extends React.Component {
}

const url = location.origin;
window.open(`https://snail-ide.com/upload?name=${this.props.projectTitle}${remixPiece}`, '_blank');
const popup = window.open(`https://snail-ide.com/upload?name=${this.props.projectTitle}${remixPiece}`, '_blank');
const imageUri = this.state.imageUri;
popup.onload(async () => {
popup.postMessage({
p4: {
type: 'image',
uri: imageUri
}
}, e.origin);
const projectUri = await getProjectUri();
popup.postMessage({
p4: {
type: 'project',
uri: projectUri
}
}, e.origin);
});
});
}
render() {
Expand Down

0 comments on commit b104992

Please sign in to comment.