Skip to content

Commit 2d16151

Browse files
committed
going to update stuff, but we are not broken at least now
1 parent ca1a010 commit 2d16151

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

app/src/components/App.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { toggleLoggedIn } from '../redux/reducers/slice/appStateSlice';
55
import { useDispatch } from 'react-redux';
66

77
import AppContainer from '../containers/AppContainer';
8-
98
/**
109
* The `App` component is the root component of the React application. It performs an initial check
1110
* to determine if a user is logged in (not a 'guest') by inspecting local storage, and updates the
@@ -15,7 +14,7 @@ import AppContainer from '../containers/AppContainer';
1514
* The `useEffect` hook is used to perform the login check once on component mount, ensuring that
1615
* the login state is correctly set based on the presence of a specific item in local storage.
1716
*
18-
* @returns {JSX.Element} Renders the `AppContainer` wrapped within a div with a class of 'app',
17+
* @returns {JSX.Element} Renders the `AppContainer` wrapped within a div with a class of 'app',
1918
* serving as the root of the user interface.
2019
*
2120
* This component interacts with Redux by dispatching actions to modify the global state, particularly

app/src/components/right/ExportButton.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ import { useSelector } from 'react-redux';
1111
import { RootState } from '../../redux/store';
1212
import zipFiles from '../../helperFunctions/zipFiles';
1313

14+
// NOTE: from the v22 team, this file is unused, if you are editing this and nothing is changing.
15+
// dont say I did not warn you.
16+
1417
/**
1518
* Renders an export button that triggers a modal for selecting export options.
1619
* The button and modal allow users to export project components in various formats.

app/src/helperFunctions/generateCode.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ const generateUnformattedCode = (
119119

120120
currentComponent.children.forEach((child) => {
121121
const newChild = { ...child };
122+
console.log({ newChild });
122123
switch (child.type) {
123124
case 'Component':
124125
const component = components.find((c) => c.id === child.typeId);
@@ -324,7 +325,7 @@ const generateUnformattedCode = (
324325
? `{${childElement.stateUsed.compLink}}`
325326
: `"${childElement.attributes.compLink}"`;
326327
}
327-
328+
// NOTE-NOAH. this is hard coded and will interfere with new elements.
328329
const nestableTags = [
329330
'h1',
330331
'h2',

app/src/helperFunctions/zipFiles.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { State } from '../interfaces/Interfaces';
77
* @param {State} state - The current state of the project.
88
*/
99
const zipFiles = (state: State): void => {
10+
console.log('zipping those files...');
1011
//initializes zip
1112
var zip = new JSZip();
1213
let reacTypeApp = zip.folder('ReacTypeApp');
@@ -19,6 +20,7 @@ const zipFiles = (state: State): void => {
1920
);
2021
//writes each component as its own file in the component folder
2122
for (let i in state.components) {
23+
console.log(state.components[i]);
2224
componentFolder.file(
2325
`${state.components[i].name}.jsx`,
2426
state.components[i].code

0 commit comments

Comments
 (0)