From 1a5ab4d47e3d1bb0ffaee6640c116a16595aa71e Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Fri, 31 Jan 2025 14:40:59 +0530 Subject: [PATCH] Remove showing domain status in overview pannel --- .../pages/org-slug/projects/id/Overview.tsx | 63 +++++++++++-------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/packages/frontend/src/pages/org-slug/projects/id/Overview.tsx b/packages/frontend/src/pages/org-slug/projects/id/Overview.tsx index 170661e3..c6001b85 100644 --- a/packages/frontend/src/pages/org-slug/projects/id/Overview.tsx +++ b/packages/frontend/src/pages/org-slug/projects/id/Overview.tsx @@ -1,26 +1,35 @@ import { useEffect, useState } from 'react'; -import { Link, useNavigate, useOutletContext } from 'react-router-dom'; +import { + Link, + // useNavigate, + useOutletContext +} from 'react-router-dom'; import { RequestError } from 'octokit'; import { useOctokit } from 'context/OctokitContext'; import { GitCommitWithBranch, OutletContextType } from '../../../../types'; -import { useGQLClient } from 'context/GQLClientContext'; -import { Button, Heading, Avatar, Tag } from 'components/shared'; +// import { useGQLClient } from 'context/GQLClientContext'; +import { + // Button, + Heading, + Avatar, + // Tag +} from 'components/shared'; import { getInitials } from 'utils/geInitials'; import { BranchStrokeIcon, - CheckRoundFilledIcon, - ClockIcon, + // CheckRoundFilledIcon, + // ClockIcon, CursorBoxIcon, GithubStrokeIcon, - GlobeIcon, + // GlobeIcon, LinkIcon, CalendarDaysIcon, } from 'components/shared/CustomIcon'; import { Activity } from 'components/projects/project/overview/Activity'; import { OverviewInfo } from 'components/projects/project/overview/OverviewInfo'; import { relativeTimeMs } from 'utils/time'; -import { Domain, DomainStatus } from 'gql-client'; +// import { Domain, DomainStatus } from 'gql-client'; import { AuctionCard } from 'components/projects/project/overview/Activity/AuctionCard'; const COMMITS_PER_PAGE = 4; @@ -28,12 +37,12 @@ const PROJECT_UPDATE_WAIT_MS = 5000; const OverviewTabPanel = () => { const { octokit } = useOctokit(); - const navigate = useNavigate(); + // const navigate = useNavigate(); const [activities, setActivities] = useState([]); const [fetchingActivities, setFetchingActivities] = useState(true); - const [liveDomain, setLiveDomain] = useState(); + // const [liveDomain, setLiveDomain] = useState(); - const client = useGQLClient(); + // const client = useGQLClient(); const { project, onUpdate } = useOutletContext(); useEffect(() => { @@ -107,22 +116,22 @@ const OverviewTabPanel = () => { return () => clearInterval(timerId); }, [onUpdate]); - useEffect(() => { - const fetchLiveProdDomain = async () => { - const { domains } = await client.getDomains(project.id, { - branch: project.prodBranch, - status: DomainStatus.Live, - }); + // useEffect(() => { + // const fetchLiveProdDomain = async () => { + // const { domains } = await client.getDomains(project.id, { + // branch: project.prodBranch, + // status: DomainStatus.Live, + // }); - if (domains.length === 0) { - return; - } + // if (domains.length === 0) { + // return; + // } - setLiveDomain(domains[0]); - }; + // setLiveDomain(domains[0]); + // }; - fetchLiveProdDomain(); - }, [project]); + // fetchLiveProdDomain(); + // }, [project]); return (
@@ -153,7 +162,7 @@ const OverviewTabPanel = () => { ))}
- }> + {/* }> {liveDomain ? ( }> Connected @@ -174,7 +183,7 @@ const OverviewTabPanel = () => { )} - + */} {project.deployments.length !== 0 ? ( <> {/* SOURCE */} @@ -195,13 +204,13 @@ const OverviewTabPanel = () => {
- {deployment.domain.name ?? + {deployment.domain?.name ?? `https://${project.name.toLowerCase()}.${deployment.deployer.baseDomain}`}