@@ -44,4 +44,4 @@ const Deployments = () => {
);
};
-export default Deployments;
+export default DeploymentsTabPanel;
diff --git a/packages/frontend/src/components/Overview.tsx b/packages/frontend/src/components/projects/project/OverviewTabPanel.tsx
similarity index 85%
rename from packages/frontend/src/components/Overview.tsx
rename to packages/frontend/src/components/projects/project/OverviewTabPanel.tsx
index f56baa74..574e1cf9 100644
--- a/packages/frontend/src/components/Overview.tsx
+++ b/packages/frontend/src/components/projects/project/OverviewTabPanel.tsx
@@ -1,15 +1,15 @@
import React from 'react';
import ActivityCard from './ActivityCard';
-import activityDetails from '../assets/activities.json';
-import { ProjectDetails } from '../types/project';
-import { relativeTime } from '../utils/time';
+import activityDetails from '../../../assets/activities.json';
+import { ProjectDetails } from '../../../types/project';
+import { relativeTime } from '../../../utils/time';
interface OverviewProps {
project: ProjectDetails;
}
-const Overview = ({ project }: OverviewProps) => (
+const OverviewTabPanel = ({ project }: OverviewProps) => (
@@ -54,4 +54,4 @@ const Overview = ({ project }: OverviewProps) => (
);
-export default Overview;
+export default OverviewTabPanel;
diff --git a/packages/frontend/src/components/Tab.tsx b/packages/frontend/src/components/projects/project/ProjectTabs.tsx
similarity index 77%
rename from packages/frontend/src/components/Tab.tsx
rename to packages/frontend/src/components/projects/project/ProjectTabs.tsx
index 4b071610..b45e572b 100644
--- a/packages/frontend/src/components/Tab.tsx
+++ b/packages/frontend/src/components/projects/project/ProjectTabs.tsx
@@ -1,9 +1,10 @@
import React from 'react';
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
-import Overview from './Overview';
-import Deployments from './Deployments';
-import { ProjectDetails } from '../types/project';
+import OverviewTabPanel from './OverviewTabPanel';
+import DeploymentsTabPanel from './DeploymentsTabPanel';
+import { ProjectDetails } from '../../../types/project';
+import SettingsTabPanel from './SettingsTabPanel';
interface ProjectTabsProps {
project: ProjectDetails;
@@ -26,15 +27,6 @@ const Integrations = () => (
);
-const Settings = () => (
-
- Content of settings tab
-
- It uses a dictionary of over 200 Latin words, combined with a handful of
- model sentence.
-
-
-);
const ProjectTabs = ({ project }: ProjectTabsProps) => {
return (
@@ -51,10 +43,10 @@ const ProjectTabs = ({ project }: ProjectTabsProps) => {
Settings
-
+
-
+
@@ -63,7 +55,7 @@ const ProjectTabs = ({ project }: ProjectTabsProps) => {
-
+
);
diff --git a/packages/frontend/src/components/projects/project/SettingsTabPanel.tsx b/packages/frontend/src/components/projects/project/SettingsTabPanel.tsx
new file mode 100644
index 00000000..e24626a1
--- /dev/null
+++ b/packages/frontend/src/components/projects/project/SettingsTabPanel.tsx
@@ -0,0 +1,83 @@
+import React, { createElement } from 'react';
+
+import {
+ Tabs,
+ TabsHeader,
+ TabsBody,
+ Tab,
+ TabPanel,
+} from '@material-tailwind/react';
+
+import GeneralTabPanel from './settings/GeneralTabPanel';
+
+const Domains = () => {
+ return
Domains
;
+};
+
+const EnvironmentVariables = () => {
+ return
Environment Variables
;
+};
+
+const Members = () => {
+ return
Members
;
+};
+
+const tabsData = [
+ {
+ label: 'General',
+ icon: '^',
+ value: 'general',
+ component: GeneralTabPanel,
+ },
+ {
+ label: 'Domains',
+ icon: '^',
+ value: 'domains',
+ component: Domains,
+ },
+ {
+ label: 'Environment variables',
+ icon: '^',
+ value: 'environmentVariables',
+ component: EnvironmentVariables,
+ },
+ {
+ label: 'Members',
+ icon: '^',
+ value: 'members',
+ component: Members,
+ },
+];
+
+const SettingsTabPanel = () => {
+ return (
+ <>
+
+
+ {tabsData.map(({ label, value, icon }) => (
+
+
+
+ ))}
+
+
+ {tabsData.map(({ value, component }) => (
+
+ {createElement(component)}
+
+ ))}
+
+
+ >
+ );
+};
+
+export default SettingsTabPanel;
diff --git a/packages/frontend/src/components/projects/project/settings/GeneralTabPanel.tsx b/packages/frontend/src/components/projects/project/settings/GeneralTabPanel.tsx
new file mode 100644
index 00000000..32cfc9cd
--- /dev/null
+++ b/packages/frontend/src/components/projects/project/settings/GeneralTabPanel.tsx
@@ -0,0 +1,76 @@
+import React from 'react';
+import { useForm } from 'react-hook-form';
+
+import { Button } from '@material-tailwind/react';
+import { Input } from '@material-tailwind/react';
+
+const GeneralTabPanel = () => {
+ const { handleSubmit, register } = useForm({
+ defaultValues: {
+ appName: 'iglootools',
+ description: '',
+ },
+ });
+
+ return (
+
+ );
+};
+
+export default GeneralTabPanel;
diff --git a/packages/frontend/src/pages/projects/Project.tsx b/packages/frontend/src/pages/projects/Project.tsx
index 37698041..f6e882b1 100644
--- a/packages/frontend/src/pages/projects/Project.tsx
+++ b/packages/frontend/src/pages/projects/Project.tsx
@@ -5,7 +5,7 @@ import { Button } from '@material-tailwind/react';
import HorizontalLine from '../../components/HorizontalLine';
import projects from '../../assets/projects.json';
-import ProjectTabs from '../../components/Tab';
+import ProjectTabs from '../../components/projects/project/ProjectTabs';
const getProject = (id: number) => {
return projects.find((project) => {
diff --git a/packages/frontend/src/pages/projects/create/Success.tsx b/packages/frontend/src/pages/projects/create/Success.tsx
index 9873ceb8..d2fdd03b 100644
--- a/packages/frontend/src/pages/projects/create/Success.tsx
+++ b/packages/frontend/src/pages/projects/create/Success.tsx
@@ -1,7 +1,8 @@
import React from 'react';
-import { Button } from '@material-tailwind/react';
import { Link } from 'react-router-dom';
+import { Button } from '@material-tailwind/react';
+
const Success = () => {
return (
@@ -16,7 +17,7 @@ const Success = () => {
Your project has been deployed at{' '}
- ^www.iglootools.snowballtools.xyz
+ ^ www.iglootools.snowballtools.xyz