mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-01 21:23:10 +00:00
fix domain cypress and not found after delete issue (#13450)
This commit is contained in:
parent
11b034231a
commit
859a594429
@ -379,7 +379,7 @@ const DomainDetailsPage = ({
|
|||||||
entity: t('label.domain'),
|
entity: t('label.domain'),
|
||||||
})}
|
})}
|
||||||
icon={<StyleIcon color={DE_ACTIVE_COLOR} width="18px" />}
|
icon={<StyleIcon color={DE_ACTIVE_COLOR} width="18px" />}
|
||||||
id="rename-button"
|
id="edit-style-button"
|
||||||
name={t('label.style')}
|
name={t('label.style')}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
|
@ -43,7 +43,8 @@ const DomainPage = () => {
|
|||||||
const { fqn } = useParams<{ fqn: string }>();
|
const { fqn } = useParams<{ fqn: string }>();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const { permissions } = usePermissionProvider();
|
const { permissions } = usePermissionProvider();
|
||||||
const { domains, refreshDomains, updateDomains } = useDomainProvider();
|
const { domains, refreshDomains, updateDomains, domainLoading } =
|
||||||
|
useDomainProvider();
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const [isMainContentLoading, setIsMainContentLoading] = useState(true);
|
const [isMainContentLoading, setIsMainContentLoading] = useState(true);
|
||||||
const [activeDomain, setActiveDomain] = useState<Domain>();
|
const [activeDomain, setActiveDomain] = useState<Domain>();
|
||||||
@ -114,8 +115,8 @@ const DomainPage = () => {
|
|||||||
? getDomainPath(updatedDomains[0].fullyQualifiedName)
|
? getDomainPath(updatedDomains[0].fullyQualifiedName)
|
||||||
: getDomainPath();
|
: getDomainPath();
|
||||||
|
|
||||||
history.push(domainPath);
|
|
||||||
refreshDomains();
|
refreshDomains();
|
||||||
|
history.push(domainPath);
|
||||||
})
|
})
|
||||||
.catch((err: AxiosError) => {
|
.catch((err: AxiosError) => {
|
||||||
showErrorToast(
|
showErrorToast(
|
||||||
@ -144,13 +145,13 @@ const DomainPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (domainFqn) {
|
if (domainFqn && domains.length > 0) {
|
||||||
fetchDomainByName(domainFqn);
|
fetchDomainByName(domainFqn);
|
||||||
}
|
}
|
||||||
}, [domainFqn]);
|
}, [domainFqn, domains]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (domains.length > 0 && !domainFqn) {
|
if (domains.length > 0 && !domainFqn && !domainLoading) {
|
||||||
history.push(getDomainPath(domains[0].fullyQualifiedName));
|
history.push(getDomainPath(domains[0].fullyQualifiedName));
|
||||||
}
|
}
|
||||||
}, [domains, domainFqn]);
|
}, [domains, domainFqn]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user