Skip to content
Snippets Groups Projects
Commit fae99a70 authored by Johannes Baiter's avatar Johannes Baiter Committed by Chris Beer
Browse files

Use getCurrentCanvas selector instead of getVisibleCanvasIds


Co-authored-by: default avatarChris Beer <chris@cbeer.info>
parent f00f045c
Branches
Tags
No related merge requests found
...@@ -5,7 +5,7 @@ import { withStyles } from '@material-ui/core/styles'; ...@@ -5,7 +5,7 @@ import { withStyles } from '@material-ui/core/styles';
import { withPlugins } from '../extend/withPlugins'; import { withPlugins } from '../extend/withPlugins';
import { ViewerInfo } from '../components/ViewerInfo'; import { ViewerInfo } from '../components/ViewerInfo';
import { import {
getCanvasLabel, getCanvases, getCanvasIndex, getVisibleCanvasIds getCanvasLabel, getCanvases, getCanvasIndex, getCurrentCanvas,
} from '../state/selectors'; } from '../state/selectors';
/** /**
...@@ -17,7 +17,7 @@ const mapStateToProps = (state, props) => { ...@@ -17,7 +17,7 @@ const mapStateToProps = (state, props) => {
const { windowId } = props; const { windowId } = props;
const canvases = getCanvases(state, { windowId }); const canvases = getCanvases(state, { windowId });
const canvasIndex = getCanvasIndex(state, { windowId }); const canvasIndex = getCanvasIndex(state, { windowId });
const canvasId = getVisibleCanvasIds(state, { windowId })[0]; const canvasId = (getCurrentCanvas(state, { windowId }) || {}).id;
return { return {
canvasCount: canvases.length, canvasCount: canvases.length,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment