diff --git a/packages/frontend/src/components/projects/ProjectSearchBar.tsx b/packages/frontend/src/components/projects/ProjectSearchBar.tsx index bbba2d07..41c8c958 100644 --- a/packages/frontend/src/components/projects/ProjectSearchBar.tsx +++ b/packages/frontend/src/components/projects/ProjectSearchBar.tsx @@ -1,5 +1,6 @@ import React, { useCallback, useState } from 'react'; import { useCombobox } from 'downshift'; +import { Project } from 'gql-client'; import { List, @@ -9,8 +10,6 @@ import { Typography, } from '@material-tailwind/react'; -import { Project } from 'gql-client'; - import SearchBar from '../SearchBar'; import { useGQLClient } from '../../context/GQLClientContext'; diff --git a/packages/frontend/src/components/projects/project/OverviewTabPanel.tsx b/packages/frontend/src/components/projects/project/OverviewTabPanel.tsx index c1426ef9..efbc495b 100644 --- a/packages/frontend/src/components/projects/project/OverviewTabPanel.tsx +++ b/packages/frontend/src/components/projects/project/OverviewTabPanel.tsx @@ -1,4 +1,5 @@ import React, { useMemo } from 'react'; +import { Project } from 'gql-client'; import { Typography, Button, Chip } from '@material-tailwind/react'; @@ -8,17 +9,19 @@ import { ProjectDetails } from '../../../types/project'; import { relativeTimeMs } from '../../../utils/time'; interface OverviewProps { - project: ProjectDetails; + project: Project; + organizationProject: ProjectDetails; } -const OverviewTabPanel = ({ project }: OverviewProps) => { +const OverviewTabPanel = ({ project, organizationProject }: OverviewProps) => { + // TODO: Fetch current deployment const currentDeploymentTitle = useMemo(() => { - const deployment = project.deployments.find((deployment) => { + const deployment = organizationProject?.deployments.find((deployment) => { return deployment.isCurrent === true; }); return deployment?.title; - }, []); + }, [organizationProject]); return (
{project.domain}
+ {organizationProject.domain ? ( +{organizationProject.domain}
) : (^ Source
-{project.source}
+{organizationProject.source}
^ Deployment
@@ -63,7 +66,7 @@ const OverviewTabPanel = ({ project }: OverviewProps) => {^ Created
- {relativeTimeMs(project.createdAt)} by ^ {project.createdBy} + {relativeTimeMs(project.createdAt)} by ^ {project.owner.name}