Skip to content

Commit beb2f54

Browse files
committed
refactored Ax
1 parent 305f626 commit beb2f54

File tree

1 file changed

+5
-4
lines changed
  • src/app/components/StateRoute

1 file changed

+5
-4
lines changed

src/app/components/StateRoute/Ax.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,28 @@ const AxTree = (props) => {
3434
} = props;
3535

3636
const dispatch = useDispatch();
37-
const [hideButton, setHideButton] = useState(true);
3837
const [showTree, setShowTree] = useState(false);
3938
const [selectedValue, setSelectedValue] = useState('disable')
39+
const [showParagraph, setShowParagraph] = useState(true)
4040

4141
const enableAxTreeButton = () => {
4242
dispatch(toggleAxTree('toggleAxRecord'));
4343
dispatch(setCurrentTabInApp('AxTree'));
44-
setSelectedValue('enable')
45-
setHideButton(false);
44+
setSelectedValue('enable');
45+
setShowParagraph(false);
4646
setShowTree(true);
4747
}
4848

4949
const disableAxTree = () => {
5050
dispatch(toggleAxTree('toggleAxRecord'));
5151
setSelectedValue('disable');
52+
setShowParagraph(true);
5253
setShowTree(false);
5354
}
5455

5556
return (
5657
<div>
57-
<p>A Note to Developers: Reactime is using the Chrome Debugging API in order to grab the Accessibility Tree. Enabling this option will allow you to record Accessibility Tree snapshots, but will result in the Chrome browser notifying you that the Chrome Debugger has started.</p>
58+
{showParagraph && <p>A Note to Developers: Reactime is using the Chrome Debugging API in order to grab the Accessibility Tree. Enabling this option will allow you to record Accessibility Tree snapshots, but will result in the Chrome browser notifying you that the Chrome Debugger has started.</p>}
5859
<div>
5960
{<input
6061
type='radio'

0 commit comments

Comments
 (0)