How to use the decentraland-dapps/dist/modules/loading/selectors.isLoadingType function in decentraland-dapps

To help you get started, we’ve selected a few decentraland-dapps examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github decentraland / builder / src / modules / editor / sagas.ts View on Github external
if (project) {
    // load asset packs
    const areLoaded = yield select(hasLoadedAssetPacks)
    if (!areLoaded) {
      yield put(loadAssetPacksRequest())
    }

    // fix legacy stuff
    let scene: Scene = yield getSceneByProjectId(project.id, type)
    yield put(fixLegacyNamespacesRequest(scene))
    const fixSuccessAction: FixLegacyNamespacesSuccessAction = yield take(FIX_LEGACY_NAMESPACES_SUCCESS)
    scene = fixSuccessAction.payload.scene

    // if assets packs are being loaded wait for them to finish
    const state: RootState = yield select(state => state)
    if (isLoadingType(state.assetPack.loading, LOAD_ASSET_PACKS_REQUEST)) {
      yield take(LOAD_ASSET_PACKS_SUCCESS)
    }

    // sync scene assets
    yield put(syncSceneAssetsRequest(scene))
    const syncSuccessAction = yield take(SYNC_SCENE_ASSETS_SUCCESS)
    scene = syncSuccessAction.payload.scene

    yield put(setEditorReadOnly(isReadOnly))
    yield createNewEditorScene(project)

    // Set the remote url for scripts
    yield call(() => editorWindow.editor.sendExternalAction(setScriptUrl(`${BUILDER_SERVER_URL}/storage/assets`)))

    // Spawns the assets
    yield renderScene(scene)
github decentraland / builder / src / modules / pool / selectors.ts View on Github external
(projectLoading, authLoading) =>
    isLoadingType(authLoading, AUTH_REQUEST) ||
    isLoadingType(projectLoading, LOAD_PROJECTS_REQUEST) ||
    isLoadingType(projectLoading, LOAD_PUBLIC_PROJECT_REQUEST) ||
    isLoadingType(projectLoading, LOAD_POOLS_REQUEST)
)
github decentraland / builder / src / modules / project / selectors.ts View on Github external
  (projectLoading, authLoading) => isLoadingType(authLoading, AUTH_REQUEST) || isLoadingType(projectLoading, LOAD_PUBLIC_PROJECT_REQUEST)
)
github decentraland / builder / src / modules / auth / selectors.ts View on Github external
export const isLoggingIn = (state: RootState) => isLoadingType(getLoading(state), AUTH_REQUEST)
export const getIdToken = createSelector(
github decentraland / builder / src / modules / editor / selectors.ts View on Github external
(project, _ready, loadingProject, loadingAuth) => {
    if (project) {
      return false
    } else if (isLoadingType(loadingProject, LOAD_MANIFEST_REQUEST)) {
      return true
    } else if (isLoadingType(loadingAuth, AUTH_REQUEST)) {
      return true
    }
    return false
  }
)
github decentraland / builder / src / modules / pool / selectors.ts View on Github external
(projectLoading, authLoading) =>
    isLoadingType(authLoading, AUTH_REQUEST) ||
    isLoadingType(projectLoading, LOAD_PROJECTS_REQUEST) ||
    isLoadingType(projectLoading, LOAD_PUBLIC_PROJECT_REQUEST) ||
    isLoadingType(projectLoading, LOAD_POOLS_REQUEST)
)
github decentraland / builder / src / modules / editor / selectors.ts View on Github external
(project, _ready, loadingProject, loadingAuth) => {
    if (project) {
      return false
    } else if (isLoadingType(loadingProject, LOAD_MANIFEST_REQUEST)) {
      return true
    } else if (isLoadingType(loadingAuth, AUTH_REQUEST)) {
      return true
    }
    return false
  }
)
github decentraland / builder / src / modules / pool / selectors.ts View on Github external
(projectLoading, authLoading) =>
    isLoadingType(authLoading, AUTH_REQUEST) ||
    isLoadingType(projectLoading, LOAD_PROJECTS_REQUEST) ||
    isLoadingType(projectLoading, LOAD_PUBLIC_PROJECT_REQUEST) ||
    isLoadingType(projectLoading, LOAD_POOLS_REQUEST)
)
github decentraland / builder / src / modules / pool / selectors.ts View on Github external
(projectLoading, authLoading) =>
    isLoadingType(authLoading, AUTH_REQUEST) ||
    isLoadingType(projectLoading, LOAD_PROJECTS_REQUEST) ||
    isLoadingType(projectLoading, LOAD_PUBLIC_PROJECT_REQUEST) ||
    isLoadingType(projectLoading, LOAD_POOLS_REQUEST)
)