Skip to content

Commit

Permalink
fix: appliction was rendered too early (#6388)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Feb 29, 2024
1 parent 1acb4bb commit 2bf11b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions frontend/src/component/application/Application.tsx
Expand Up @@ -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);
Expand All @@ -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) => {
Expand Down
Expand Up @@ -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();
Expand Down Expand Up @@ -75,7 +76,7 @@ export const ApplicationEdit = () => {
const tabData = [
{
label: 'Application overview',
component: <ApplicationEdit />,
component: <ApplicationView />,
},
{
label: 'Edit application',
Expand Down

0 comments on commit 2bf11b2

Please sign in to comment.