-
{ selectedTab.name }
- { selectedTab.panel }
+ {selectedTab?.panel && (
+
+
+ {selectedTab.name}
+
+ {selectedTab.panel}
- ) }
+ )}
)
}
diff --git a/app/web/src/components/IdeSideBar/sidebarConfig.tsx b/app/web/src/components/IdeSideBar/sidebarConfig.tsx
index 9015091..1ac449b 100644
--- a/app/web/src/components/IdeSideBar/sidebarConfig.tsx
+++ b/app/web/src/components/IdeSideBar/sidebarConfig.tsx
@@ -3,100 +3,154 @@ import { SvgNames } from 'src/components/Svg/Svg'
import { useIdeContext } from 'src/helpers/hooks/useIdeContext'
interface SidebarConfigType {
- name: string,
- icon: SvgNames,
- disabled: boolean,
- panel: ReactNode | null,
+ name: string
+ icon: SvgNames
+ disabled: boolean
+ panel: ReactNode | null
}
-export const sidebarTopConfig : SidebarConfigType[] = [
- {
- name: 'Files',
- icon: 'files',
- disabled: false,
- panel:
- Coming Soon
-
-
- We're working on multi-file support in tandem with the GitHub integration.
-
- ,
- },
- {
- name: 'GitHub',
- icon: 'github',
- disabled: false,
- panel:
- Coming Soon
-
-
- This integration will allow you to sync a project with a GitHub repo and push changes back to it as a commit!
-
- ,
- },
- {
- name: 'Visibility',
- icon: 'eye',
- disabled: true,
- panel: null,
- },
+export const sidebarTopConfig: SidebarConfigType[] = [
+ {
+ name: 'Files',
+ icon: 'files',
+ disabled: false,
+ panel: (
+
+
+ Coming Soon
+
+
+
+ We're working on multi-file support in tandem with the GitHub
+ integration.
+
+
+ ),
+ },
+ {
+ name: 'GitHub',
+ icon: 'github',
+ disabled: false,
+ panel: (
+
+
+ Coming Soon
+
+
+
+ This integration will allow you to sync a project with a GitHub repo
+ and push changes back to it as a commit!
+
+
+ ),
+ },
+ {
+ name: 'Visibility',
+ icon: 'eye',
+ disabled: true,
+ panel: null,
+ },
]
+const DiscordLink = () => (
+
+ Discord
+
+)
+
const settingsConfig = [
- {
- title: "Editor",
- name: "editor",
- open: false,
- content:
This text will go in a details element!
,
- },
- {
- title: "Viewer",
- name: "viewer",
- open: false,
- content:
This text will go in a details element!
- },
- {
- title: "Console",
- name: "console",
- open: false,
- content:
This text will go in a details element!
- },
+ {
+ title: 'Editor',
+ name: 'editor',
+ open: false,
+ content: (
+
+
+ Coming Soon
+
+
+
+ We're building configuration settings for the Viewer pane now. Join us on if you want to lend a hand!
+
+
+ ),
+ },
+ {
+ title: 'Viewer',
+ name: 'viewer',
+ open: false,
+ content: (
+
+
+ Coming Soon
+
+
+
+ We're building configuration settings for the Viewer pane now. Join us on if you want to lend a hand!
+
+
+ ),
+ },
+ {
+ title: 'Console',
+ name: 'console',
+ open: false,
+ content: (
+
+
+ Coming Soon
+
+
+
+ We're building configuration settings for the Viewer pane now. Join us on if you want to lend a hand!
+
+
+ ),
+ },
]
-export const sidebarBottomConfig : SidebarConfigType[] = [
- {
- name: 'Settings',
- icon: 'gear',
- disabled: false,
- panel:
,
- },
+export const sidebarBottomConfig: SidebarConfigType[] = [
+ {
+ name: 'Settings',
+ icon: 'gear',
+ disabled: false,
+ panel:
,
+ },
]
export const sidebarCombinedConfig = [
- ...sidebarTopConfig,
- ...sidebarBottomConfig,
+ ...sidebarTopConfig,
+ ...sidebarBottomConfig,
]
-function SettingsMenu({parentName}: {parentName: string}) {
- const { state, thunkDispatch } = useIdeContext()
- return (
-
- { settingsConfig.map(item => (
-
-
- { state.sideTray.slice(-1)[0] === item.name && item.content }
-
- //
- // thunkDispatch((dispatch) => dispatch({type: 'settingsButtonClicked', payload:[parentName, item.name]}))}
- // >{ item.title }hi there
- // { state.sideTray.slice(-1)[0] === item.name && item.content }
- // {state.sideTray.slice(-1)[0]}
- //
- ))}
-
- )
+function SettingsMenu({ parentName }: { parentName: string }) {
+ const { state, thunkDispatch } = useIdeContext()
+ return (
+
+ {settingsConfig.map((item) => (
+ {
+ e.preventDefault()
+ thunkDispatch((dispatch) =>
+ dispatch({
+ type: 'settingsButtonClicked',
+ payload: [parentName, item.name],
+ })
+ )
+ }}
+ >
+
+ {item.title}
+
+ {item.content}
+
+ ))}
+
+ )
}
diff --git a/app/web/src/components/IdeWrapper/IdeWrapper.tsx b/app/web/src/components/IdeWrapper/IdeWrapper.tsx
index 1ab9ddf..7b52242 100644
--- a/app/web/src/components/IdeWrapper/IdeWrapper.tsx
+++ b/app/web/src/components/IdeWrapper/IdeWrapper.tsx
@@ -32,17 +32,17 @@ const IdeWrapper = ({ cadPackage }: Props) => {
return (
-