Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Fix: Update inspection data only in "inspect" screen #562

Merged
merged 5 commits into from
Oct 19, 2018

Conversation

AtuyL
Copy link
Collaborator

@AtuyL AtuyL commented Oct 17, 2018

I noticed that an error with the Inspection screen.
It tried to update the inspected DAT even when navigating to other screens.

https://github.com/dat-land/dat-desktop/pull/562/files#diff-bf58091931fe43a77612c0916614753dL8

This PR now updates the dat only when the inspect screen is selected.
This PR is based on #561

@AtuyL AtuyL changed the base branch from master to react October 17, 2018 16:12
@martinheidegger martinheidegger changed the title Fix/inspect view Fix: Update inspection data only in "inspect" screen Oct 18, 2018
Copy link
Collaborator

@martinheidegger martinheidegger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -0,0 +1,11 @@
export const INTRO = 'intro'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

import Inspect from '../components/inspect'
import { closeInspectDat } from '../actions'
import { connect } from 'react-redux'

const mapStateToProps = state => ({
dat: state.dats[state.inspect.key]
dat: state.screen === SCREEN.INSPECT ? state.dats[state.inspect.key] : null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

Copy link
Collaborator

@martinheidegger martinheidegger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@martinheidegger martinheidegger merged commit f687bbe into react Oct 19, 2018
@martinheidegger martinheidegger deleted the fix/inspect-view branch October 19, 2018 13:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants