Minor frontend fixes
This commit is contained in:
@@ -22,7 +22,6 @@ import CreateIcon from '@mui/icons-material/Create'
|
|||||||
import { toast } from 'react-toastify'
|
import { toast } from 'react-toastify'
|
||||||
import YAML from "yaml";
|
import YAML from "yaml";
|
||||||
|
|
||||||
|
|
||||||
const AppCreationModal = ({ open, onClose, theme, globalUrl, isCloud }) => {
|
const AppCreationModal = ({ open, onClose, theme, globalUrl, isCloud }) => {
|
||||||
const [openApiModal, setOpenApiModal] = useState(false)
|
const [openApiModal, setOpenApiModal] = useState(false)
|
||||||
const [generateAppModal, setGenerateAppModal] = useState(false)
|
const [generateAppModal, setGenerateAppModal] = useState(false)
|
||||||
@@ -263,11 +262,12 @@ const AppCreationModal = ({ open, onClose, theme, globalUrl, isCloud }) => {
|
|||||||
return response.json();
|
return response.json();
|
||||||
})
|
})
|
||||||
.then((responseJson) => {
|
.then((responseJson) => {
|
||||||
if (responseJson.success) {
|
if (responseJson?.success === true) {
|
||||||
setAppValidation(responseJson.id);
|
setAppValidation(responseJson?.id)
|
||||||
|
navigate(`/apps/new?id=${responseJson?.id}`)
|
||||||
} else {
|
} else {
|
||||||
if (responseJson.reason !== undefined) {
|
if (responseJson.reason !== undefined) {
|
||||||
setOpenApiError(responseJson.reason);
|
setOpenApiError(responseJson.reason)
|
||||||
}
|
}
|
||||||
toast("An error occurred in the response");
|
toast("An error occurred in the response");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { useState, useEffect, useContext, useCallback, memo, useMemo, useRef } from "react";
|
import React, { useState, useEffect, useContext, useCallback, memo, useMemo, useRef } from "react";
|
||||||
import theme from "../theme.jsx";
|
import theme from "../theme.jsx";
|
||||||
import { isMobile } from "react-device-detect";
|
import { isMobile } from "react-device-detect";
|
||||||
|
|
||||||
import { useLocation, useNavigate } from "react-router-dom";
|
import { useLocation, useNavigate } from "react-router-dom";
|
||||||
import {
|
import {
|
||||||
TextField, Button, Typography, MenuItem, Select, Tabs, Tab, Zoom,
|
TextField, Button, Typography, MenuItem, Select, Tabs, Tab, Zoom,
|
||||||
|
|||||||
Reference in New Issue
Block a user