Skip to content
Snippets Groups Projects
Commit 0bdc1c48 authored by mthomas41's avatar mthomas41
Browse files

modal will now display the move selected on

parent a5ccc6c8
Branches main
No related tags found
No related merge requests found
......@@ -171,6 +171,7 @@ function scanAndDelete(positionIdentity, tree) {
delete tree.positions[positionIdentity];
}
}
const gameTreesSlice = createSlice({
name: 'gameTrees',
initialState: {},
......@@ -434,7 +435,7 @@ const gameTreesSlice = createSlice({
if (tree === undefined) {
return;
}
tree.modificationTime = impure.createTimestamp(); // updating the modificationTime
tree.modificationTime = impure.createTimestamp();
let positionEncoding = tree.positions[positionIdentity];
let parent = tree.positions[positionEncoding.parentIdentity];
while (parent !== undefined && positionEncoding !== undefined) {
......@@ -457,7 +458,7 @@ const gameTreesSlice = createSlice({
if (tree === undefined) {
return;
}
tree.modificationTime = impure.createTimestamp(); // updating the modificationTime
tree.modificationTime = impure.createTimestamp();
const positionEncoding = tree.positions[positionIdentity];
const parent = tree.positions[positionEncoding.parentIdentity];
tree.currentPositionIdentity = parent.identity;
......
......@@ -2,7 +2,7 @@ import React, { useRef, useEffect } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { useHistory } from 'react-router-dom';
import { Modal, createModalOpener } from '../../widgets/modal';
import { Menu, MenuButton } from '../../widgets/menu.js';
import { Menu, MenuButton, MenuText } from '../../widgets/menu.js';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './scoreSheet.module.css';
......@@ -71,6 +71,9 @@ function Move(props) {
</button>
<Modal subpath={`scoresheetmove${props.move}`} altText={'move selector'}>
<Menu>
<MenuText>
{props.move}
</MenuText>
<MenuButton onClick={makingMainline}>
MakeLine
</MenuButton>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment