mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-09-14 11:06:15 +05:00
fix(domains): don't render CDN info message as an error in DNS tooltip
validateDomain returns isValid: true for CDN-fronted domains but reuses the `error` field to carry the provider's informational warning. Both domain tooltips branched on `error` alone, so the message rendered under a red "Error:" heading even though the badge correctly showed a green "Behind Cloudflare" state. Check the valid+message case first, matching how the badge already distinguishes the two. Applied to both the table view (columns.tsx) and the card view (show-domains.tsx), which shares the same tooltip. Fixes #4910 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
73e4fdd757
commit
8f0702c4da
@ -209,7 +209,9 @@ export const createColumns = ({
|
||||
</Badge>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent className="max-w-xs">
|
||||
{validationState?.error ? (
|
||||
{validationState?.isValid && validationState?.message ? (
|
||||
<p>{validationState.message}</p>
|
||||
) : validationState?.error ? (
|
||||
<div className="flex flex-col gap-1">
|
||||
<p className="font-medium text-red-500">Error:</p>
|
||||
<p>{validationState.error}</p>
|
||||
|
||||
@ -626,7 +626,10 @@ export const ShowDomains = ({ id, type }: Props) => {
|
||||
</Badge>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent className="max-w-xs">
|
||||
{validationState?.error ? (
|
||||
{validationState?.isValid &&
|
||||
validationState?.message ? (
|
||||
<p>{validationState.message}</p>
|
||||
) : validationState?.error ? (
|
||||
<div className="flex flex-col gap-1">
|
||||
<p className="font-medium text-red-500">
|
||||
Error:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user