Skip to content

Commit fce510f

Browse files
committed
removed dark mode (no longer in use)
1 parent 5cd33a9 commit fce510f

23 files changed

+34
-325
lines changed

app/src/components/ContextAPIManager/AssignTab/components/ComponentDropDrown.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,9 @@ const ComponentDropDown = ({
1212
componentInput,
1313
setComponentInput
1414
}) => {
15-
const {
16-
state
17-
//, isDarkMode
18-
} = useSelector((store: RootState) => ({
15+
const { state } = useSelector((store: RootState) => ({
1916
state: store.appState
20-
//isDarkMode: store.darkMode.isDarkMode
2117
}));
22-
//const color = isDarkMode ? 'white' : 'black';
23-
const color = 'white';
2418

2519
const onChange = (event, newValue) => {
2620
if (typeof newValue === 'string') {

app/src/components/ContextAPIManager/AssignTab/components/ContextDropDown.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ const ContextDropDown = ({
1515
}) => {
1616
const { allContext } = contextStore;
1717

18-
// const isDarkMode = useSelector(
19-
// (store: RootState) => store.darkMode.isDarkMode
20-
// );
21-
//const color = isDarkMode ? 'white' : 'black';
22-
const color = 'white';
23-
2418
const onChange = (event, newValue) => {
2519
if (typeof newValue === 'string') {
2620
setContextInput({

app/src/components/ContextAPIManager/ContextManager.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ const useStyles = makeStyles({
2020
});
2121

2222
const ContextManager = (props): JSX.Element => {
23-
const {
24-
//isDarkMode,
25-
style
26-
} = useSelector((store: RootState) => ({
27-
// isDarkMode: store.darkMode.isDarkMode,
23+
const { style } = useSelector((store: RootState) => ({
2824
style: store.styleSlice
2925
}));
3026
const classes = useStyles();
@@ -34,8 +30,6 @@ const ContextManager = (props): JSX.Element => {
3430
setValue(newValue);
3531
};
3632

37-
// const background_Color = isDarkMode ? '#21262b' : 'white'
38-
// const color = isDarkMode ? 'white' : 'white'
3933
const color = 'white';
4034

4135
return (

app/src/components/ContextAPIManager/CreateTab/components/AddContextForm.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,10 @@ const AddContextForm = ({
2525
const { allContext } = contextStore;
2626
const [btnDisabled, setBtnDisabled] = useState(false);
2727
const [open, setOpen] = useState(false);
28-
const {
29-
state
30-
// isDarkMode
31-
} = useSelector((store: RootState) => ({
32-
//isDarkMode: store.darkMode.isDarkMode,
28+
const { state } = useSelector((store: RootState) => ({
3329
state: store.appState
3430
}));
35-
//const color = isDarkMode ? 'black' : 'white';
31+
3632
const color = 'white';
3733

3834
//handler for submitting new context for creation

app/src/components/ContextAPIManager/CreateTab/components/AddDataForm.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const AddDataForm = ({ handleClickInputData, currentContext }) => {
1010
//const [contextInput, setContextInput] = React.useState(null);
1111
const defaultInputData = { inputKey: '', inputValue: '' };
1212
const [dataContext, setDataContext] = React.useState(defaultInputData);
13-
// const { isDarkMode } = useSelector((store: RootState) => store.darkMode);
13+
1414
const saveData = () => {
1515
setDataContext(defaultInputData);
1616
if (dataContext.inputKey === '' || dataContext.inputValue === '') {
@@ -19,7 +19,6 @@ const AddDataForm = ({ handleClickInputData, currentContext }) => {
1919
}
2020
handleClickInputData(currentContext, dataContext);
2121
};
22-
// const color = isDarkMode ? 'black' : 'white';
2322
const color = 'white';
2423

2524
const handleChange = (e) => {

app/src/components/StateManagement/StateManagement.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ const useStyles = makeStyles({
2121

2222
const StateManager = (props): JSX.Element => {
2323
const state = useSelector((store: RootState) => store.appState);
24-
// const isDarkMode = useSelector(
25-
// (state: RootState) => state.darkMode.isDarkMode
26-
// );
2724

2825
const { components } = state;
2926
const classes = useStyles();
@@ -36,8 +33,6 @@ const StateManager = (props): JSX.Element => {
3633
// add hook here to access which component has been clicked
3734
// then this will re-render the dataTable
3835

39-
//const background_Color = isDarkMode ? '#21262b' : '#191919';
40-
//const color = isDarkMode ? 'white' : 'black';
4136
const background_Color = '#21262b';
4237
const color = 'white';
4338

app/src/components/bottom/BottomTabs.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const BottomTabs = (props): JSX.Element => {
2525
state: store.appState,
2626
contextParam: store.contextSlice,
2727
style: store.styleSlice
28-
// isDarkMode: store.darkMode.isDarkMode
2928
}));
3029
const [tab, setTab] = useState(0);
3130
const classes = useStyles();

app/src/components/left/ComponentDrag.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import { useSelector } from 'react-redux';
88
const ComponentDrag = ({ isThemeLight }): JSX.Element => {
99
const classes = useStyles();
1010
const state = useSelector((store: RootState) => store.appState);
11-
// const isDarkMode = useSelector(
12-
// (store: RootState) => store.darkMode.isDarkMode
13-
// );
11+
1412
const isFocus = (targetId: Number) => {
1513
return state.canvasFocus.componentId === targetId ? true : false;
1614
};
@@ -21,14 +19,7 @@ const ComponentDrag = ({ isThemeLight }): JSX.Element => {
2119
{/* Font size for 'index' in root components in .compPanelItem h3 style.css */}
2220
<div className={classes.panelWrapperList}>
2321
{/* Heading just below ADD button */}
24-
<h4
25-
className={
26-
// !isDarkMode
27-
// ? classes.lightThemeFontColor
28-
// : classes.darkThemeFontColor
29-
classes.darkThemeFontColor
30-
}
31-
>
22+
<h4 className={classes.darkThemeFontColor}>
3223
{state.projectType === 'Next.js' || state.projectType === 'Gatsby.js'
3324
? 'Pages'
3425
: 'Root Components'}

app/src/components/left/ComponentsContainer.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,15 @@ import { useSelector } from 'react-redux';
88
const ComponentsContainer = () => {
99
const classes = useStyles();
1010
const state = useSelector((store: RootState) => store.appState);
11-
// const isDarkMode = useSelector(
12-
// (store: RootState) => store.darkMode.isDarkMode
13-
// );
11+
1412
const isFocus = (targetId: Number) => {
1513
return state.canvasFocus.componentId === targetId ? true : false;
1614
};
1715
return (
1816
<div>
1917
<div className={classes.panelWrapper}>
2018
<div className={classes.panelWrapperList}>
21-
<h4
22-
className={
23-
// !isDarkMode
24-
// ? classes.lightThemeFontColor
25-
// : classes.darkThemeFontColor
26-
classes.darkThemeFontColor
27-
}
28-
>
29-
Reusable Components
30-
</h4>
19+
<h4 className={classes.darkThemeFontColor}>Reusable Components</h4>
3120
<Grid container direction="column" alignContent={'center'}>
3221
{state.components
3322
.filter((comp) => !state.rootComponents.includes(comp.id))

app/src/components/left/DragDropPanel.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ Hook state:
2020
*/
2121
// Extracted the drag and drop functionality from HTMLPanel to make a modular component that can hang wherever the future designers may choose.
2222
const DragDropPanel = (props): JSX.Element => {
23-
// const isDarkMode = useSelector(
24-
// (store: RootState) => store.darkMode.isDarkMode
25-
// );
2623
const dispatch = useDispatch();
2724
const { state, contextParam } = useSelector((store: RootState) => ({
2825
state: store.appState,
@@ -38,7 +35,6 @@ const DragDropPanel = (props): JSX.Element => {
3835
return (
3936
<div className={'HTMLItems'}>
4037
<div id="HTMLItemsTopHalf">
41-
{/* { color: !isDarkMode ? '#C6C6C6' : '#fff' } */}
4238
<h3 style={{ color: '#C6C6C6' }}>HTML Elements</h3>
4339
<Grid
4440
container
@@ -67,7 +63,6 @@ const DragDropPanel = (props): JSX.Element => {
6763
})}
6864
</Grid>
6965
{state.projectType === 'Classic React' ? (
70-
//!isDarkMode ? '#C6C6C6' : '#fff'
7166
<h3 style={{ color: '#C6C6C6' }}>React Router</h3>
7267
) : null}
7368
<Grid
@@ -99,7 +94,6 @@ const DragDropPanel = (props): JSX.Element => {
9994
</Grid>
10095

10196
{state.projectType === 'Next.js' ? (
102-
// color: !isDarkMode ? '#C6C6C6' : '#fff'
10397
<h3 style={{ color: 'C6C6C6' }}>Next.js</h3>
10498
) : null}
10599
{htmlTypesToRender.map((option) => {

0 commit comments

Comments
 (0)