Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const mapState = (state: RootState): MapStateProps => ({
isConnecting: isConnecting(state),
hasError: !!getWalletError(state)
})
const mapState = (state: RootState): MapStateProps => {
return {
project: getCurrentProject(state)!,
isConnecting: isConnecting(state),
isConnected: isConnected(state),
isRecording: isRecording(state),
isUploadingAssets: isUploadingAssets(state),
isUploadingRecording: isUploadingRecording(state),
isCreatingFiles: isCreatingFiles(state),
isLoggedIn: isLoggedIn(state),
walletError: !!getWalletError(state),
media: getMedia(state),
ethAddress: getAddress(state),
mediaProgress: getProgress(state),
deploymentProgress: getUploadProgress(state),
deploymentStatus: getCurrentDeploymentStatus(state),
occupiedParcels: getOccuppiedParcels(state),
deployment: getCurrentDeployment(state),
error: getDeploymentError(state)
}
}
const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => {
return {
project: getProjects(state)[ownProps.projectId],
isConnecting: isConnecting(state),
isConnected: isConnected(state),
isUploadingAssets: isUploadingAssets(state),
isCreatingFiles: isCreatingFiles(state),
hasError: !!getWalletError(state),
ethAddress: getAddress(state),
deploymentProgress: getUploadProgress(state),
deploymentStatus: getDeploymentStatus(state)[ownProps.projectId],
error: getDeploymentError(state)
}
}