Skip to content

Commit 195114b

Browse files
committed
commented out lastColor for now
2 parents 78fa2c7 + dca78bd commit 195114b

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
"babel-preset-react": "^6.24.1",
137137
"babel-preset-stage-0": "^6.24.1",
138138
"clean-webpack-plugin": "^0.1.19",
139+
"concurrently": "^5.1.0",
139140
"copy-webpack-plugin": "^4.5.2",
140141
"cross-env": "^5.2.1",
141142
"css-loader": "^0.28.11",

src/components/LeftColExpansionPanel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ const LeftColExpansionPanel = (props: LeftColExpPanPropsInt) => {
7979
{/* {This is the component responsible for the collapsing transition animation for each component card} */}
8080
<Collapse
8181
in={focusedToggle}
82-
collapsedHeight={70} //The type for the Collapse component is asking for a string, but if you put in a string and not a number, the component itself breaks.
82+
collapsedHeight={'70px'}
83+
timeout={500} //The type for the Collapse component is asking for a string, but if you put in a string and not a number, the component itself breaks.
8384
>
8485
{/* NOT SURE WHY COLOR: RED IS USED, TRIED REMOVING IT AND NO VISIBLE CHANGE OCCURED. */}
8586
<Grid

src/utils/componentReducer.util.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ export const addComponent = (
6565
//chooses a color for the component from the random color generator
6666
let componentColor = getColor();
6767

68-
// const lastColor = state.components.find(element => {
69-
// element.id === state.nextId - 1;
70-
// }).color;
68+
const lastColor = state.components.find(element => {
69+
element.id === state.nextId - 1;
70+
}).color;
7171

72-
// console.log('lastColor', lastColor);
72+
console.log('lastColor', lastColor);
7373

7474
while (componentColor === lastColor) {
7575
componentColor = getColor();

0 commit comments

Comments
 (0)