Update UI when IP address is unavailable and project is created via auctions
This commit is contained in:
parent
6dcee29487
commit
90e9260eb6
@ -62,31 +62,39 @@ const Domains = () => {
|
||||
headingText="Domains"
|
||||
button={
|
||||
<>
|
||||
<Button
|
||||
as="a"
|
||||
href="add"
|
||||
variant="secondary"
|
||||
leftIcon={<PlusIcon />}
|
||||
size="md"
|
||||
>
|
||||
Add domain
|
||||
</Button>
|
||||
{!project.auctionId && (
|
||||
<Button
|
||||
as="a"
|
||||
href="add"
|
||||
variant="secondary"
|
||||
leftIcon={<PlusIcon />}
|
||||
size="md"
|
||||
>
|
||||
Add domain
|
||||
</Button>
|
||||
)}
|
||||
</>
|
||||
}
|
||||
>
|
||||
{domains.map((domain) => {
|
||||
return (
|
||||
<DomainCard
|
||||
domains={domains}
|
||||
domain={domain}
|
||||
key={domain.id}
|
||||
// TODO: Use github API for getting linked repository
|
||||
branches={branches}
|
||||
project={project}
|
||||
onUpdate={fetchDomains}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
{project.auctionId ? (
|
||||
<p className="text-gray-500">
|
||||
Custom domains not supported for auction driven deployments.
|
||||
</p>
|
||||
) : (
|
||||
domains.map((domain) => {
|
||||
return (
|
||||
<DomainCard
|
||||
domains={domains}
|
||||
domain={domain}
|
||||
key={domain.id}
|
||||
// TODO: Use github API for getting linked repository
|
||||
branches={branches}
|
||||
project={project}
|
||||
onUpdate={fetchDomains}
|
||||
/>
|
||||
);
|
||||
})
|
||||
)}
|
||||
</ProjectSettingContainer>
|
||||
);
|
||||
};
|
||||
|
@ -74,9 +74,9 @@ const Config = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const dnsData = await client.getLatestDNSDataByProjectId(id);
|
||||
const dnsData = await client.getLatestDNSDataByProjectId(id);
|
||||
|
||||
setIPAddress(dnsData.value);
|
||||
setIPAddress(dnsData.value);
|
||||
};
|
||||
|
||||
fetchDNSData();
|
||||
@ -102,18 +102,25 @@ const Config = () => {
|
||||
<Table.Row>
|
||||
<Table.RowHeaderCell>A</Table.RowHeaderCell>
|
||||
<Table.Cell>@</Table.Cell>
|
||||
<Table.Cell>{IPAddress ?? 'Not Configured'}</Table.Cell>
|
||||
<Table.Cell>
|
||||
<p className={!IPAddress ? 'text-red-500' : ''}>
|
||||
{IPAddress ?? 'Not available'}
|
||||
</p>
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
</Table.Body>
|
||||
</Table>
|
||||
|
||||
<InlineNotification
|
||||
variant="info"
|
||||
title={`It can take up to 48 hours for these updates to reflect
|
||||
{IPAddress && (
|
||||
<InlineNotification
|
||||
variant="info"
|
||||
title={`It can take up to 48 hours for these updates to reflect
|
||||
globally.`}
|
||||
/>
|
||||
/>
|
||||
)}
|
||||
<Button
|
||||
className="w-fit"
|
||||
disabled={!IPAddress}
|
||||
onClick={handleSubmitDomain}
|
||||
variant="primary"
|
||||
shape="default"
|
||||
|
Loading…
Reference in New Issue
Block a user