mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +01:00
fix: appliction was rendered too early (#6388)
This commit is contained in:
parent
1acb4bbb36
commit
2bf11b2ea9
@ -79,10 +79,6 @@ export const Application = () => {
|
||||
const { setToastData, setToastApiError } = useToast();
|
||||
const { pathname } = useLocation();
|
||||
|
||||
if (useOldApplicationScreen) {
|
||||
return <ApplicationEdit />;
|
||||
}
|
||||
|
||||
const basePath = `/applications/${name}`;
|
||||
|
||||
const [showDialog, setShowDialog] = useState(false);
|
||||
@ -91,6 +87,10 @@ export const Application = () => {
|
||||
setShowDialog(!showDialog);
|
||||
};
|
||||
|
||||
if (useOldApplicationScreen) {
|
||||
return <ApplicationEdit />;
|
||||
}
|
||||
|
||||
const formatDate = (v: string) => formatDateYMD(v, locationSettings.locale);
|
||||
|
||||
const onDeleteApplication = async (evt: React.SyntheticEvent) => {
|
||||
|
@ -29,6 +29,7 @@ import { formatDateYMD } from 'utils/formatDate';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
|
||||
import { TabPanel } from 'component/common/TabNav/TabPanel/TabPanel';
|
||||
import { ApplicationView } from '../ApplicationView/ApplicationView';
|
||||
|
||||
export const ApplicationEdit = () => {
|
||||
const navigate = useNavigate();
|
||||
@ -75,7 +76,7 @@ export const ApplicationEdit = () => {
|
||||
const tabData = [
|
||||
{
|
||||
label: 'Application overview',
|
||||
component: <ApplicationEdit />,
|
||||
component: <ApplicationView />,
|
||||
},
|
||||
{
|
||||
label: 'Edit application',
|
||||
|
Loading…
Reference in New Issue
Block a user