Remove hyperlink from deployer base domains

This commit is contained in:
Shreerang Kale 2025-02-03 17:14:11 +05:30
parent ced815802e
commit b50efe315b
4 changed files with 47 additions and 42 deletions

View File

@ -14,17 +14,19 @@ import EditDomainDialog from './EditDomainDialog';
import { useGQLClient } from 'context/GQLClientContext';
import { DeleteDomainDialog } from 'components/projects/Dialog/DeleteDomainDialog';
import { useToast } from 'components/shared/Toast';
// import { Tag } from 'components/shared/Tag';
import {
// CheckIcon,
// CrossIcon,
// LoadingIcon,
GearIcon,
} from 'components/shared/CustomIcon';
import { GearIcon } from 'components/shared/CustomIcon';
import { Heading } from 'components/shared/Heading';
import { Button } from 'components/shared/Button';
import { useParams } from 'react-router-dom';
// NOTE: Commented functionality to verify domain
// import { Tag } from 'components/shared/Tag';
// import {
// CheckIcon,
// CrossIcon,
// LoadingIcon,
// } from 'components/shared/CustomIcon';
// enum RefreshStatus {
// IDLE,
// CHECKING,
@ -32,6 +34,8 @@ import { useParams } from 'react-router-dom';
// CHECK_FAIL,
// }
// const CHECK_FAIL_TIMEOUT = 5000; // In milliseconds
interface DomainCardProps {
domains: Domain[];
domain: Domain;
@ -40,14 +44,6 @@ interface DomainCardProps {
onUpdate: () => Promise<void>;
}
// const CHECK_FAIL_TIMEOUT = 5000; // In milliseconds
// TODO: Get domain record
const DOMAIN_RECORD = {
type: 'A',
name: '@',
value: '56.49.19.21',
};
const DomainCard = ({
domains,
@ -58,10 +54,10 @@ const DomainCard = ({
}: DomainCardProps) => {
const { toast, dismiss } = useToast();
const { id } = useParams();
// const [refreshStatus, SetRefreshStatus] = useState(RefreshStatus.IDLE);
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
const [editDialogOpen, setEditDialogOpen] = useState(false);
const [dnsRecord, setDnsRecord] = useState<DNSRecordAttributes | null>(null);
// const [refreshStatus, SetRefreshStatus] = useState(RefreshStatus.IDLE);
const client = useGQLClient();
@ -215,7 +211,7 @@ const DomainCard = ({
{dnsRecord ? (
<tr>
<td>{dnsRecord.resourceType}</td>
<td>{DOMAIN_RECORD.name}</td>
<td>@</td>
<td>{dnsRecord.value ?? 'Not Configured'}</td>
</tr>
) : (

View File

@ -1,18 +1,14 @@
import {
// useMemo,
useCallback,
useEffect,
} from 'react';
import {
// Controller,
useForm,
SubmitHandler,
} from 'react-hook-form';
import { Domain } from 'gql-client';
import {
// Select,
// Option,
Typography,
} from '@snowballtools/material-tailwind-react-fork';
@ -22,6 +18,14 @@ import { Button } from 'components/shared/Button';
import { Input } from 'components/shared/Input';
import { useToast } from 'components/shared/Toast';
// NOTE: Commented redirect domain functionality
// import {
// Select,
// Option,
// } from '@snowballtools/material-tailwind-react-fork';
// import { Controller } from 'react-hook-form';
// import { useMemo } from 'react';
// const DEFAULT_REDIRECT_OPTIONS = ['none'];
interface EditDomainDialogProp {
@ -178,7 +182,7 @@ const EditDomainDialog = ({
})}
disabled={
!Boolean(branches.length)
//|| watch('redirectedTo') !== DEFAULT_REDIRECT_OPTIONS[0]
// || watch('redirectedTo') !== DEFAULT_REDIRECT_OPTIONS[0]
}
/>
{!isValid && (

View File

@ -1,13 +1,15 @@
// import { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { useForm } from 'react-hook-form';
// import { InlineNotification } from 'components/shared/InlineNotification';
// import { Radio } from 'components/shared/Radio';
import { Heading } from 'components/shared/Heading';
import { Input } from 'components/shared/Input';
import { Button } from 'components/shared/Button';
// NOTE: Commented redirect domain functionality
// import { useEffect, useState } from 'react';
// import { InlineNotification } from 'components/shared/InlineNotification';
// import { Radio } from 'components/shared/Radio';
interface SetupDomainFormValues {
domainName: string;
isWWW: string;
@ -28,8 +30,8 @@ const SetupDomain = () => {
mode: 'onChange',
});
// const [domainStr, setDomainStr] = useState<string>('');
const navigate = useNavigate();
// const [domainStr, setDomainStr] = useState<string>('');
// const isWWWRadioOptions = [
// { label: domainStr, value: 'false' },
// { label: `www.${domainStr}`, value: 'true' },

View File

@ -1,29 +1,21 @@
import { useEffect, useState } from 'react';
import {
Link,
// useNavigate,
useOutletContext,
} from 'react-router-dom';
import { RequestError } from 'octokit';
// import { useGQLClient } from 'context/GQLClientContext';
import {
// Button,
// Tag,
Heading,
Avatar,
} from 'components/shared';
import {
// CheckRoundFilledIcon,
// ClockIcon,
// GlobeIcon,
BranchStrokeIcon,
CursorBoxIcon,
GithubStrokeIcon,
LinkIcon,
CalendarDaysIcon,
} from 'components/shared/CustomIcon';
// import { Domain, DomainStatus } from 'gql-client';
import { useOctokit } from 'context/OctokitContext';
import { GitCommitWithBranch, OutletContextType } from '../../../../types';
import { getInitials } from 'utils/geInitials';
@ -32,6 +24,20 @@ import { OverviewInfo } from 'components/projects/project/overview/OverviewInfo'
import { relativeTimeMs } from 'utils/time';
import { AuctionCard } from 'components/projects/project/overview/Activity/AuctionCard';
// NOTE: Commented elements related to domain verification
// import { useGQLClient } from 'context/GQLClientContext';
// import { Domain, DomainStatus } from 'gql-client';
// import {
// CheckRoundFilledIcon,
// ClockIcon,
// GlobeIcon,
// } from 'components/shared/CustomIcon';
// import {
// Button,
// Tag,
// } from 'components/shared';
// import { useNavigate } from 'react-router-dom';
const COMMITS_PER_PAGE = 4;
const PROJECT_UPDATE_WAIT_MS = 5000;
@ -150,14 +156,11 @@ const OverviewTabPanel = () => {
{project.deployments &&
project.deployments.length > 0 &&
project.deployments.map((deployment, index) => (
<p>
<a
key={index}
// href={`https://${project.name.toLowerCase()}.${deployment.deployer.baseDomain}`}
className="text-sm text-elements-low-em dark:text-foreground tracking-tight truncate"
>
{deployment.deployer.baseDomain}
</a>
<p
key={index}
className="text-sm text-elements-low-em dark:text-foreground tracking-tight truncate"
>
{deployment.deployer.baseDomain}
</p>
))}
</div>