Skip to content

Commit 30e92c4

Browse files
authored
Merge pull request #41 from oslabs-beta/m-clean-up
minor clean ups
2 parents eca51ac + 24f2264 commit 30e92c4

File tree

5 files changed

+22
-39
lines changed

5 files changed

+22
-39
lines changed

app/src/components/left/HTMLItem.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ const HTMLItem : React.FC<{
4242
id: number;
4343
Icon: any;
4444
handleDelete: (id: number) => void;
45-
}> = ({ name, id, Icon, handleDelete }) => {
45+
}> = ({ name, id, handleDelete }) => {
4646

4747
const classes = useStyles();
4848
const [modal, setModal] = useState(null);
4949
const isDarkMode = useSelector((store:RootState) => store.darkMode.isDarkMode);
50-
const [{ isDragging }, drag] = useDrag({
50+
const [{ isDragging }, drag] = useDrag({ // is dragging is never read, but if deleted adjustment in the ref are needed line 122/128 ref={drag} to {...drag}
5151
item: {
5252
type: ItemTypes.INSTANCE,
5353
newInstance: true,
@@ -70,7 +70,6 @@ const HTMLItem : React.FC<{
7070
<List className="export-preference">
7171
<ListItem
7272
key={`clear${deleteID}`}
73-
button
7473
onClick={() => handleDelete(deleteID)}
7574
style={{
7675
border: '1px solid #3f51b5',
@@ -86,7 +85,6 @@ const HTMLItem : React.FC<{
8685
</ListItem>
8786
<ListItem
8887
key={`close${deleteID}`}
89-
button
9088
onClick={closeModal}
9189
style={{
9290
border: '1px solid #3f51b5',

app/src/components/left/HTMLPanel.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import makeStyles from '@mui/styles/makeStyles';
55
import {
66
Button,
77
InputLabel
8-
// TextField,
98
} from '@mui/material';
109
import TextField from '@mui/material/TextField';
1110
import { RootState } from '../../redux/store';
@@ -169,7 +168,6 @@ const HTMLPanel = (props): JSX.Element => {
169168
? classes.lightThemeFontColor
170169
: classes.darkThemeFontColor
171170
}
172-
//value="New HTML Tag"
173171
>
174172
New HTML Tag:{' '}
175173
</h4>
@@ -233,7 +231,6 @@ const HTMLPanel = (props): JSX.Element => {
233231
</InputLabel>
234232
<TextField
235233
id="elementName"
236-
// label='Element Name'
237234
color="primary"
238235
variant="outlined"
239236
type="text"
@@ -321,8 +318,6 @@ const useStyles = makeStyles({
321318
textOverflow: 'ellipsis',
322319
backgroundColor: 'rgba(255,255,255,0.15)',
323320
margin: '0px 0px 0px 0px',
324-
// width: '200px',
325-
// height: '75px',
326321
alignSelf: 'center',
327322
border: '2px solid grey'
328323
},

app/src/components/login/SignIn.tsx

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,17 @@ function Copyright() {
4949

5050
const useStyles = makeStyles((theme) => ({
5151
paper: {
52-
// marginTop: theme.spacing(8),
5352
display: 'flex',
5453
flexDirection: 'column',
5554
alignItems: 'center'
5655
},
5756
avatar: {
58-
// margin: theme.spacing(1),
5957
backgroundColor: '#3EC1AC'
6058
},
6159
form: {
6260
width: '100%' // Fix IE 11 issue.
63-
// marginTop: theme.spacing(1)
6461
},
6562
submit: {
66-
// margin: theme.spacing(1, 0, 1),
6763
cursor: 'pointer'
6864
},
6965
root: {
@@ -183,25 +179,26 @@ const SignIn: React.FC<LoginInt & RouteComponentProps> = (props) => {
183179
// 8080 for container 5656 for dev
184180
window.location.assign(`${API_BASE_URL}/auth/github`);
185181
};
186-
const responseFacebook = (response) => {
187-
if (response.accessToken) {
188-
newUserIsCreated(response.email, response.email, randomPassword()).then(
189-
(userCreated) => {
190-
if (userCreated === 'Success') {
191-
props.history.push('/');
192-
} else {
193-
sessionIsCreated(response.email, randomPassword(), true).then(
194-
(loginStatus) => {
195-
if (loginStatus === 'Success') {
196-
props.history.push('/');
197-
}
198-
}
199-
);
200-
}
201-
}
202-
);
203-
}
204-
};
182+
183+
// const responseFacebook = (response) => {
184+
// if (response.accessToken) {
185+
// newUserIsCreated(response.email, response.email, randomPassword()).then(
186+
// (userCreated) => {
187+
// if (userCreated === 'Success') {
188+
// props.history.push('/');
189+
// } else {
190+
// sessionIsCreated(response.email, randomPassword(), true).then(
191+
// (loginStatus) => {
192+
// if (loginStatus === 'Success') {
193+
// props.history.push('/');
194+
// }
195+
// }
196+
// );
197+
// }
198+
// }
199+
// );
200+
// }
201+
// };
205202

206203
// NEW DARK MODE
207204
const handleDarkModeToggle = () => {
@@ -225,7 +222,6 @@ const SignIn: React.FC<LoginInt & RouteComponentProps> = (props) => {
225222
right: 20,
226223
position: 'absolute'
227224
}}
228-
// variant="contained"
229225
endIcon={!isDarkMode ? <Brightness3Icon /> : <Brightness5Icon />}
230226
onClick={handleDarkModeToggle}
231227
>

app/src/components/login/SignUp.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,17 @@ function Copyright() {
3939

4040
const useStyles = makeStyles(theme => ({
4141
paper: {
42-
// marginTop: theme.spacing(8),
4342
display: 'flex',
4443
flexDirection: 'column',
4544
alignItems: 'center'
4645
},
4746
avatar: {
48-
// margin: theme.spacing(1),
4947
backgroundColor: '#3EC1AC'
5048
},
5149
form: {
5250
width: '100%', // Fix IE 11 issue.
53-
// marginTop: theme.spacing(3)
5451
},
5552
submit: {
56-
// margin: theme.spacing(3, 0, 2)
5753
},
5854
root: {
5955
'& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline': {

app/src/components/main/AddLink.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ function AddLink({ id, onClickHandler, linkDisplayed }) {
4141
});
4242
}
4343

44-
4544
const pagesItems = state.components.filter(comp => state.rootComponents.includes(comp.id));
4645
const dropDown = [<MenuItem style={{ color: '#000' }} disabled hidden selected>Pages</MenuItem>].concat(pagesItems.map(comp => <MenuItem style={{ color: '#000' }} value={comp.name}>{comp.name}</MenuItem>));
4746

48-
4947
return (
5048
<div style={{float: 'right'}}>
5149
<FormControl variant='outlined' focused={true} style={ {width: '100%'} }>

0 commit comments

Comments
 (0)