Skip to content

Commit 8956e97

Browse files
sonyahu15r-mcgrathHadriChannamos2502
committed
debugging rooms
Co-authored-by: r-mcgrath <[email protected]> Co-authored-by: HadriChan <[email protected]> Co-authored-by: Nam <[email protected]>
1 parent e2bb840 commit 8956e97

File tree

7 files changed

+31
-20
lines changed

7 files changed

+31
-20
lines changed

app/src/components/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { saveProject } from '../helperFunctions/projectGetSaveDel';
1717

1818
// Intermediary component to wrap main App component with higher order provider components
1919
export const App = (): JSX.Element => {
20-
const state = useSelector((store: RootState) => store.appState);
20+
// const state = useSelector((store: RootState) => store.appState);
2121

2222
const dispatch = useDispatch();
2323
// checks if user is signed in as guest or actual user and changes loggedIn boolean accordingly

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ const AddContextForm = ({
2525
const { allContext } = contextStore;
2626
const [btnDisabled, setBtnDisabled] = useState(false);
2727
const [open, setOpen] = useState(false);
28-
const { state } = useSelector((store: RootState) => ({
29-
state: store.appState
30-
}));
28+
// const { state } = useSelector((store: RootState) => ({
29+
// state: store.appState
30+
// }));
3131

3232
const color = 'white';
3333

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import TextField from '@mui/material/TextField';
33
import Button from '@mui/material/Button';
44
import Box from '@mui/material/Box';
55
import { Typography } from '@mui/material';
6-
import { useSelector } from 'react-redux';
7-
import { RootState } from '../../../../redux/store';
6+
// import { useSelector } from 'react-redux';
7+
// import { RootState } from '../../../../redux/store';
88

99
const AddDataForm = ({ handleClickInputData, currentContext }) => {
1010
//const [contextInput, setContextInput] = React.useState(null);

app/src/components/left/HTMLItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { RootState } from '../../redux/store';
99
import createModal from '../right/createModal';
1010
import makeStyles from '@mui/styles/makeStyles';
1111
import { useDrag } from 'react-dnd';
12-
import { useSelector } from 'react-redux';
12+
// import { useSelector } from 'react-redux';
1313

1414
const useStyles = makeStyles({
1515
HTMLPanelItem: {

app/src/redux/reducers/slice/appStateSlice.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,11 @@ const appStateSlice = createSlice({
12851285
toggleScreenshotTrigger: (state) => {
12861286
state.screenshotTrigger = !state.screenshotTrigger;
12871287
}
1288+
1289+
// ,configToggle: (state) => {
1290+
// state.config.saveFlag = !state.config.saveFlag;
1291+
// state.config.saveTimer = !state.config.saveTimer;
1292+
// }
12881293
}
12891294
});
12901295

app/src/redux/reducers/slice/codePreviewSlice.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ const codePreviewSlice = createSlice({
1111
name: 'codePreview',
1212
initialState,
1313
reducers: {
14-
codePreviewSave: (state,action) => {
15-
state.code = action.payload
14+
codePreviewSave: (state, action) => {
15+
state.code = action.payload;
1616
},
1717
codePreviewInput: (state, action) => {
18-
state.input = action.payload
18+
state.input = action.payload;
1919
},
2020
codePreviewCooperative: (state, action) => {
21-
return Object.assign({}, state, action.payload)
22-
},
21+
return Object.assign({}, state, action.payload);
22+
}
2323
}
24-
})
25-
24+
});
2625

27-
export const { codePreviewSave, codePreviewInput, codePreviewCooperative } = codePreviewSlice.actions;
26+
export const { codePreviewSave, codePreviewInput, codePreviewCooperative } =
27+
codePreviewSlice.actions;
2828

2929
export default codePreviewSlice.reducer;

app/src/redux/reducers/slice/contextReducer.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ interface ContextState {
3535
// -------------------------//
3636

3737
const initialState: ContextState = {
38-
allContext: [],
38+
allContext: []
3939
};
4040

4141
const contextReducerSlice = createSlice({
4242
name: 'context',
4343
initialState,
4444
reducers: {
45-
addContext: (state, action:PayloadAction<AddContextPayload>) => {
45+
addContext: (state, action: PayloadAction<AddContextPayload>) => {
4646
let newName = action.payload.name.trim();
4747
newName = newName.charAt(0).toUpperCase() + newName.slice(1);
4848
const newContext = {
@@ -52,7 +52,10 @@ const contextReducerSlice = createSlice({
5252
};
5353
state.allContext = [...state.allContext, newContext];
5454
},
55-
addContextValues: (state, action: PayloadAction<AddContextValuesPayload>) => {
55+
addContextValues: (
56+
state,
57+
action: PayloadAction<AddContextValuesPayload>
58+
) => {
5659
const newAllContext = [...state.allContext];
5760

5861
for (let i = 0; i < newAllContext.length; i += 1) {
@@ -70,7 +73,10 @@ const contextReducerSlice = createSlice({
7073
const remains = tempState.filter((el) => el.name !== action.payload.name);
7174
state.allContext = remains;
7275
},
73-
addComponentToContext: (state, action: PayloadAction<AddComponentToContextPayload>) => {
76+
addComponentToContext: (
77+
state,
78+
action: PayloadAction<AddComponentToContextPayload>
79+
) => {
7480
const newTempState = [...state.allContext];
7581
for (let i = 0; i < newTempState.length; i += 1) {
7682
if (newTempState[i].name === action.payload.context.name) {
@@ -79,7 +85,7 @@ const contextReducerSlice = createSlice({
7985
}
8086
state.allContext = newTempState;
8187
},
82-
getAllContext: (state,action) => {
88+
getAllContext: (state, action) => {
8389
state = state;
8490
},
8591
allContextCooperative: (state, action) => {

0 commit comments

Comments
 (0)