Skip to content

Commit 68494f3

Browse files
committed
commit
1 parent 2b03071 commit 68494f3

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

app/src/components/main/AddLink.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AddRoutes } from '../../interfaces/Interfaces'
2-
import React, { useContext } from 'react';
2+
import React, { useContext, useState } from 'react';
33
import StateContext from '../../context/context';
44
import FormControl from '@material-ui/core/FormControl';
55
import MenuItem from '@material-ui/core/MenuItem';
@@ -11,6 +11,7 @@ import { styleContext } from '../../containers/AppContainer';
1111
function AddLink({ id }: AddRoutes) {
1212
const { isThemeLight } = useContext(styleContext);
1313
const [state, dispatch] = useContext(StateContext);
14+
1415
const handleClick = (id) => {
1516
dispatch({
1617
type: 'ADD CHILD',
@@ -26,16 +27,16 @@ function AddLink({ id }: AddRoutes) {
2627
const currComponent = state.components.find(element => element.id === state.canvasFocus.componentId);
2728
currComponent.children.forEach(element => {
2829
if(element.childId === id) {
29-
element.attributes.compLink = event.target.value;
30-
dispatch({type: 'UPDATE ATTRIBUTES', payload: element})
30+
const state = JSON.parse(JSON.stringify(element));
31+
state.attributes.compLink = event.target.value;
32+
dispatch({type: 'UPDATE ATTRIBUTES', payload: state})
3133
}
3234
});
33-
// selectedPageName.compLink = event.target.value;
34-
// dispatch({ type: 'HREF TO', payload: });
3535
}
3636

3737
let pagesItems = state.components.filter(comp => state.rootComponents.includes(comp.id));
3838
let dropDown = pagesItems.map(comp => <MenuItem value={comp.name}>{comp.name}</MenuItem>);
39+
3940
return (
4041
<div style={{paddingBottom: '1px', float: 'right' }}>
4142
<FormControl size='small'>

app/src/containers/CustomizationPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ const CustomizationPanel = ({ isThemeLight }): JSX.Element => {
711711
const useStyles = makeStyles({
712712
select: {
713713
fontSize: '1em',
714-
'> .-icon': {
714+
'> .MuiSelect-icon': {
715715
color: '#155084'
716716
}
717717
},

0 commit comments

Comments
 (0)