mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-01 13:13: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'),
|
||||
})}
|
||||
icon={<StyleIcon color={DE_ACTIVE_COLOR} width="18px" />}
|
||||
id="rename-button"
|
||||
id="edit-style-button"
|
||||
name={t('label.style')}
|
||||
/>
|
||||
),
|
||||
|
@ -43,7 +43,8 @@ const DomainPage = () => {
|
||||
const { fqn } = useParams<{ fqn: string }>();
|
||||
const history = useHistory();
|
||||
const { permissions } = usePermissionProvider();
|
||||
const { domains, refreshDomains, updateDomains } = useDomainProvider();
|
||||
const { domains, refreshDomains, updateDomains, domainLoading } =
|
||||
useDomainProvider();
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [isMainContentLoading, setIsMainContentLoading] = useState(true);
|
||||
const [activeDomain, setActiveDomain] = useState<Domain>();
|
||||
@ -114,8 +115,8 @@ const DomainPage = () => {
|
||||
? getDomainPath(updatedDomains[0].fullyQualifiedName)
|
||||
: getDomainPath();
|
||||
|
||||
history.push(domainPath);
|
||||
refreshDomains();
|
||||
history.push(domainPath);
|
||||
})
|
||||
.catch((err: AxiosError) => {
|
||||
showErrorToast(
|
||||
@ -144,13 +145,13 @@ const DomainPage = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (domainFqn) {
|
||||
if (domainFqn && domains.length > 0) {
|
||||
fetchDomainByName(domainFqn);
|
||||
}
|
||||
}, [domainFqn]);
|
||||
}, [domainFqn, domains]);
|
||||
|
||||
useEffect(() => {
|
||||
if (domains.length > 0 && !domainFqn) {
|
||||
if (domains.length > 0 && !domainFqn && !domainLoading) {
|
||||
history.push(getDomainPath(domains[0].fullyQualifiedName));
|
||||
}
|
||||
}, [domains, domainFqn]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user