Skip to content

Commit 7e87b21

Browse files
committed
Work for now
1 parent 20436e1 commit 7e87b21

File tree

6 files changed

+45
-18
lines changed

6 files changed

+45
-18
lines changed

app/src/components/bottom/BottomTabs.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ const BottomTabs = (props): JSX.Element => {
8080
classes={{ root: classes.tabRoot, selected: classes.tabSelected }}
8181
label="CSS Editor"
8282
/>
83-
<Tab
83+
{/* <Tab (there was no more need for this tab since we created an outside button for the codePreview)
8484
disableRipple
8585
classes={{ root: classes.tabRoot, selected: classes.tabSelected }}
8686
label="Code Preview"
87-
/>
87+
/> */}
8888
<Tab
8989
disableRipple
9090
classes={{ root: classes.tabRoot, selected: classes.tabSelected }}
@@ -129,7 +129,7 @@ const BottomTabs = (props): JSX.Element => {
129129
{tab === 0 && <CreationPanel isThemeLight={props.isThemeLight} />}
130130
{tab === 1 && <CustomizationPanel isThemeLight={props.isThemeLight} />}
131131
{tab === 2 && <StylesEditor theme={theme} setTheme={setTheme} />}
132-
{tab === 3 && <CodePreview theme={theme} setTheme={setTheme} />}
132+
{/* {tab === 3 && <CodePreview theme={theme} setTheme={setTheme} />} */}
133133
{tab === 4 && <Tree data={components} />}
134134
{tab === 5 && <ContextManager theme={theme} setTheme={setTheme} />}
135135
{tab === 6 && (

app/src/components/main/Canvas.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
changeFocus,
1111
addChild,
1212
snapShotAction,
13-
toggleCodePreview
13+
// toggleCodePreview
1414
} from '../../redux/reducers/slice/appStateSlice';
1515
import { RootState } from '../../redux/store';
1616

app/src/components/right/DeleteProjects.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,26 @@ function ProjectsDialog(props: ProjectDialogProps) {
5353
aria-labelledby="project-dialog-title"
5454
open={open}
5555
>
56-
<DialogTitle style={{ color: "#000" }} id="project-dialog-title">Delete Project</DialogTitle>
56+
<DialogTitle style={{ color: "#000" }} id="project-dialog-title">User Projects</DialogTitle>
5757
<List style={{ color: "#000" }}>
58-
{projects.map((project: any, index: number) => (
58+
{projects.filter((project: any) => project.forked === undefined || project.forked === false).map((project: any, index: number) => (
59+
<ListItem
60+
button
61+
onClick={() => handleDelete(project.name)}
62+
key={index}
63+
>
64+
<ListItemAvatar>
65+
<Avatar className={classes.avatar}>
66+
<DeleteRoundedIcon />
67+
</Avatar>
68+
</ListItemAvatar>
69+
<ListItemText primary={project.name} />
70+
</ListItem>
71+
))}
72+
</List>
73+
<DialogTitle style={{ color: "#000" }} id="project-dialog-title"> MP Projects</DialogTitle>
74+
<List style={{ color: "#000" }}>
75+
{projects.filter((project: any) => project.forked === true).map((project: any, index: number) => (
5976
<ListItem
6077
button
6178
onClick={() => handleDelete(project.name)}

app/src/components/right/MarketplaceButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import React from 'react';
55
const MarketplaceButton = () => {
66
return (
77
<Link to="/marketplace" style={{ textDecoration: 'none' }}>
8-
<Button>Marketplace</Button>
8+
<Button className="marketButton">Marketplace</Button>
99
</Link>
1010
);
1111
};

app/src/components/right/OpenProjects.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ function ProjectsDialog(props: ProjectDialogProps) {
5757
>
5858
<DialogTitle style={{ color: "#000" }} id="project-dialog-title">Open Project</DialogTitle>
5959
<List style={{ color: "#000" }}>
60-
{projects.filter((project: any) => project.forked === undefined).map((project: any, index: number) => {
61-
console.log("Logging something inside the map:", project.forked); // Add this line
62-
return (
60+
{projects.filter((project: any) => project.forked === undefined || project.forked === false).map((project: any, index: number) => (
6361
<ListItem
6462
button
6563
onClick={() => handleListItemClick(project.name)}
@@ -72,15 +70,13 @@ function ProjectsDialog(props: ProjectDialogProps) {
7270
</ListItemAvatar>
7371
<ListItemText primary={project.name} />
7472
</ListItem>
75-
);
76-
})}
73+
)
74+
)}
7775
</List>
7876
{/* this section handles the projects cloned from the marketplace */}
7977
<DialogTitle style={{ color: "#000" }} id="project-dialog-title">MP Projects</DialogTitle>
8078
<List style={{ color: "#000" }}>
81-
{projects.filter((project: any) => project.forked !== undefined).map((project: any, index: number) => {
82-
console.log("Logging something inside the second map:", project.forked); // Add this line
83-
return (
79+
{projects.filter((project: any) => project.forked === true).map((project: any, index: number) => (
8480
<ListItem
8581
button
8682
onClick={() => handleListItemClick(project.name)}
@@ -93,8 +89,8 @@ function ProjectsDialog(props: ProjectDialogProps) {
9389
</ListItemAvatar>
9490
<ListItemText primary={project.name} />
9591
</ListItem>
96-
);
97-
})}
92+
)
93+
)}
9894
</List>
9995
</Dialog>
10096
);

app/src/components/top/NavBarButtons.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,21 @@ function navbarDropDown(props) {
357357
></input>
358358
<button onClick={() => joinRoom()}>Join Room</button>
359359
<p>In Room: {joinedRoom}</p>
360-
<MarketplaceButton />
360+
<Link to="/marketplace" style={{ textDecoration: 'none' }} target="_blank">
361+
<button>
362+
Marketplace
363+
<svg
364+
xmlns="http://www.w3.org/2000/svg"
365+
width="16"
366+
height="16"
367+
fill="currentColor"
368+
className="bi bi-book"
369+
viewBox="0 0 16 16"
370+
>
371+
<path d="M1 2.828c.885-.37 2.154-.769 3.388-.893 1.33-.134 2.458.063 3.112.752v9.746c-.935-.53-2.12-.603-3.213-.493-1.18.12-2.37.461-3.287.811V2.828zm7.5-.141c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492V2.687zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783z" />
372+
</svg>
373+
</button>
374+
</Link>
361375
<LoginButton />
362376
<StyledMenu // Dropdown menu connected to Manage Project Button
363377
id="customized-menu"

0 commit comments

Comments
 (0)