Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load project into editor when app starts #2

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion src/lib/project-fetcher-hoc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const ProjectFetcherHOC = function (WrappedComponent) {
};
ProjectFetcherComponent.defaultProps = {
assetHost: 'https://assets.scratch.mit.edu',
projectHost: 'https://projects.scratch.mit.edu'
projectHost: 'http://localhost:3000/download'
};

const mapStateToProps = state => ({
Expand Down
2 changes: 1 addition & 1 deletion src/lib/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Storage extends ScratchStorage {
this.projectHost = projectHost;
}
getProjectGetConfig (projectAsset) {
return `${this.projectHost}/${projectAsset.assetId}`;
return this.projectHost
}
getProjectCreateConfig () {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/reducers/project-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const START_REMIXING = 'scratch-gui/project-state/START_REMIXING';
const START_UPDATING_BEFORE_CREATING_COPY = 'scratch-gui/project-state/START_UPDATING_BEFORE_CREATING_COPY';
const START_UPDATING_BEFORE_CREATING_NEW = 'scratch-gui/project-state/START_UPDATING_BEFORE_CREATING_NEW';

const defaultProjectId = '0'; // hardcoded id of default project
const defaultProjectId = '123'; // hardcoded id of default project

const LoadingState = keyMirror({
NOT_LOADED: null,
Expand Down