diff --git a/packages/frontend/src/components/projects/project/OverviewTabPanel.tsx b/packages/frontend/src/components/projects/project/OverviewTabPanel.tsx index 497b6afc..2331a6fa 100644 --- a/packages/frontend/src/components/projects/project/OverviewTabPanel.tsx +++ b/packages/frontend/src/components/projects/project/OverviewTabPanel.tsx @@ -1,28 +1,20 @@ -import React, { useMemo } from 'react'; +import React from 'react'; import { Project } from 'gql-client'; import { Typography, Button, Chip } from '@material-tailwind/react'; import ActivityCard from './ActivityCard'; import activityDetails from '../../../assets/activities.json'; -import { ProjectDetails } from '../../../types/project'; import { relativeTimeMs } from '../../../utils/time'; interface OverviewProps { project: Project; - organizationProject: ProjectDetails; } -const OverviewTabPanel = ({ project, organizationProject }: OverviewProps) => { - // TODO: Fetch current deployment - const currentDeploymentTitle = useMemo(() => { - const deployment = organizationProject?.deployments.find((deployment) => { - return deployment.isCurrent === true; - }); - - return deployment?.title; - }, [organizationProject]); +// TODO: Check any live domain is set for production branch +const IS_DOMAIN_SETUP = true; +const OverviewTabPanel = ({ project }: OverviewProps) => { return (
{organizationProject.domain}
+ {IS_DOMAIN_SETUP ? ( +^ Source
-{organizationProject.source}
+{project.deployments[0]?.branch}
^ Deployment
-{currentDeploymentTitle}
++ {project.deployments[0]?.domain?.name} +
^ Created
diff --git a/packages/frontend/src/components/projects/project/ProjectTabs.tsx b/packages/frontend/src/components/projects/project/ProjectTabs.tsx index 54327fd7..5bb384b6 100644 --- a/packages/frontend/src/components/projects/project/ProjectTabs.tsx +++ b/packages/frontend/src/components/projects/project/ProjectTabs.tsx @@ -4,12 +4,10 @@ import { Project } from 'gql-client'; import OverviewTabPanel from './OverviewTabPanel'; import DeploymentsTabPanel from './DeploymentsTabPanel'; -import { ProjectDetails } from '../../../types/project'; import SettingsTabPanel from './SettingsTabPanel'; interface ProjectTabsProps { project: Project; - organizationProject: ProjectDetails; onUpdate: () => Promise