File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,6 +54,13 @@ const setIndexable = indexable => {
5454
5555const TWProjectMetaFetcherHOC = function (WrappedComponent) {
5656 class ProjectMetaFetcherComponent extends React.Component {
57+ constructor(props) {
58+ super(props);
59+ this.state = {
60+ canSave: false,
61+ canRemix: false
62+ };
63+ }
5764 componentDidUpdate (prevProps) {
5865 // project title resetting is handled in titled-hoc.jsx
5966 if (this.props.reduxProjectId !== prevProps.reduxProjectId) {
@@ -86,6 +93,9 @@ const TWProjectMetaFetcherHOC = function (WrappedComponent) {
8693 if (instructions || credits) {
8794 this.props.onSetDescription(instructions, credits);
8895 }
96+
97+ this.setState({ canSave: data.canSave == "true" });
98+ this.setState({ canRemix: data.canRemix == "true" });
8999 setIndexable(true);
90100 })
91101 .catch(err => {
@@ -112,6 +122,8 @@ const TWProjectMetaFetcherHOC = function (WrappedComponent) {
112122 return (
113123 <WrappedComponent
114124 {...props}
125+ canSave={this.state.canSave}
126+ canRemix={this.state.canRemix}
115127 />
116128 );
117129 }
Original file line number Diff line number Diff line change @@ -13,12 +13,10 @@ const RenderGUI = props => (
1313 cloudHost = { cloudHost }
1414 canUseCloud
1515 hasCloudPermission
16- canSave={true}
1716 canCreateNew = { creatingNewProject }
18- //isShared,canRemix,canEditTitle
1917 isShared = { ! restrictedMode }
2018 canShare = { false } //just do it from project page
21- basePath={process.env.ROOT}
19+ basePath = { process . env . ROOT }
2220 canEditTitle = { false } //just do it from project page
2321 enableCommunity = { ! restrictedMode }
2422 { ...props }
You can’t perform that action at this time.
0 commit comments