Skip to content

Commit 4f423dd

Browse files
committed
correctlly set canUseCloud
1 parent 41efb9f commit 4f423dd

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎src/lib/tw-project-meta-fetcher-hoc.jsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ const TWProjectMetaFetcherHOC = function (WrappedComponent) {
5858
super(props);
5959
this.state = {
6060
canSave: false,
61-
canRemix: false
61+
canRemix: false,
62+
canUseCloud: false
6263
};
6364
}
6465
componentDidUpdate (prevProps) {
@@ -84,6 +85,7 @@ const TWProjectMetaFetcherHOC = function (WrappedComponent) {
8485
const username = data.username;
8586
if (username) {
8687
this.props.onSetUsername(username);
88+
this.setState({ canUseCloud: true });
8789
}
8890
const authorName = data.author.username;
8991
const authorThumbnail = `https://trampoline.turbowarp.org/avatars/${data.author.id}`;
@@ -124,6 +126,7 @@ const TWProjectMetaFetcherHOC = function (WrappedComponent) {
124126
{...props}
125127
canSave={this.state.canSave}
126128
canRemix={this.state.canRemix}
129+
canUseCloud={this.state.canUseCloud}
127130
/>
128131
);
129132
}

‎src/playground/render-gui.jsx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ const restrictedMode = searchParams.get('onlyEditor') === '1';
1111

1212
const RenderGUI = props => (
1313
<GUI
14-
cloudHost={cloudHost}
15-
canUseCloud
14+
cloudHost={cloudHost}
1615
hasCloudPermission
1716
canCreateNew={creatingNewProject}
1817
isShared={!restrictedMode}

0 commit comments

Comments
 (0)