Skip to content

Commit 42050d8

Browse files
authored
Merge pull request #18 from oslabs-beta/ui-changes
Ui changes
2 parents 8b7c2a4 + 2e48548 commit 42050d8

File tree

2 files changed

+32
-29
lines changed

2 files changed

+32
-29
lines changed

src/app/components/SwitchState.jsx

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
1-
import React from 'react';
2-
import Select from 'react-select';
1+
// import React from 'react';
2+
// import Select from 'react-select';
3+
// import Action from './Action';
4+
// import { useStoreContext } from '../store';
35

4-
// SwitchStateDropdown should display options including all
5-
// and specific states being used
6-
// TODO: Need to get the getter name (for functional components)
7-
// and state name for stateful components
8-
const SwitchStateDropdown = () => {
9-
// Requirements:
10-
// Should be able to filter the Actions by the name of the state being changed
11-
// Should consider how to import the state names being changed
12-
// Should display the "All state", as well as specific state names as the options
13-
// When clicked on "All state" >> should display all Actions
14-
// When clicked on a specific "state" >> should only display Actions corresponding to the state
6+
// // SwitchStateDropdown should display options including all
7+
// // and specific states being used
8+
// // TODO: Need to get the getter name (for functional components)
9+
// // and state name for stateful components
10+
// const SwitchStateDropdown = () => {
11+
// const [{ tabs, currentTab}, dispatch] = useStoreContext();
12+
// const { snapshots } = tabs[currentTab];
13+
// // Requirements:
14+
// // Should be able to filter the Actions by the name of the state being changed
15+
// // Should consider how to import the state names being changed
16+
// // Should display the "All state", as well as specific state names as the options
17+
// // When clicked on "All state" >> should display all Actions
18+
// // When clicked on a specific "state" >> should only display Actions corresponding to the state
1519

16-
const sampleDropdown = [
17-
{label: 'Overview'},
18-
{label: 'setUsername'},
19-
{label: 'setPassword'}
20-
];
20+
// // const sampleDropdown = [
21+
// // {label: 'Overview'},
22+
// // {label: 'setUsername'},
23+
// // {label: 'setPassword'}
24+
// // ];
2125

22-
return (
23-
<Select
24-
className="state-dropdown"
25-
placeholder="Choose your state"
26-
options={sampleDropdown}
27-
/>
28-
)
29-
}
26+
// return (
27+
// <Select
28+
// className="state-dropdown"
29+
// placeholder="Choose your state"
30+
// options={sampleDropdown}
31+
// />
32+
// )
33+
// }
3034

31-
export default SwitchStateDropdown;
35+
// export default SwitchStateDropdown;

src/app/containers/ActionContainer.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable react/no-array-index-key */
22
import React from 'react';
3-
import SwitchStateDropdown from '../components/SwitchState';
3+
//import SwitchStateDropdown from '../components/SwitchState';
44
import Action from '../components/Action';
55

66
import { emptySnapshots } from '../actions/actions';
@@ -33,7 +33,6 @@ function ActionContainer() {
3333
<button className="empty-button" onClick={() => dispatch(emptySnapshots())} type="button">
3434
Empty
3535
</button>
36-
<SwitchStateDropdown />
3736
</div>
3837
<div>{actionsArr}</div>
3938
</div>

0 commit comments

Comments
 (0)