()
| 42 | }, [loadedProject]) |
| 43 | |
| 44 | const loadProjectFromStorage = () => { |
| 45 | setLoadedProject(null) |
| 46 | if (ownerID === 'examples') { |
| 47 | loadExampleProject(projectID).then((proj) => { |
| 48 | setLoadedProject(proj) |
| 49 | setEditorState(null) |
| 50 | }) |
| 51 | } else if (ownerID === 'local') { |
| 52 | projectLoader.loadProject(ownerID, projectID).then((proj) => { |
| 53 | setLoadedProject(proj) |
| 54 | setEditorState(null) |
| 55 | }) |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | useEffect(() => { |
| 60 | loadProjectFromStorage() |
no test coverage detected