code format
This commit is contained in:
parent
187724342f
commit
b18a91deb0
2 changed files with 15 additions and 5 deletions
|
|
@ -14,6 +14,7 @@ import {
|
||||||
import CodeTabsComponent from "../../components/codeTabsComponent";
|
import CodeTabsComponent from "../../components/codeTabsComponent";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import { EXPORT_CODE_DIALOG } from "../../constants/constants";
|
import { EXPORT_CODE_DIALOG } from "../../constants/constants";
|
||||||
|
import { AuthContext } from "../../contexts/authContext";
|
||||||
import { TabsContext } from "../../contexts/tabsContext";
|
import { TabsContext } from "../../contexts/tabsContext";
|
||||||
import { TemplateVariableType } from "../../types/api";
|
import { TemplateVariableType } from "../../types/api";
|
||||||
import { tweakType, uniqueTweakType } from "../../types/components";
|
import { tweakType, uniqueTweakType } from "../../types/components";
|
||||||
|
|
@ -27,7 +28,6 @@ import {
|
||||||
tabsArray,
|
tabsArray,
|
||||||
} from "../../utils/utils";
|
} from "../../utils/utils";
|
||||||
import BaseModal from "../baseModal";
|
import BaseModal from "../baseModal";
|
||||||
import { AuthContext } from "../../contexts/authContext";
|
|
||||||
|
|
||||||
const ApiModal = forwardRef(
|
const ApiModal = forwardRef(
|
||||||
(
|
(
|
||||||
|
|
@ -46,7 +46,12 @@ const ApiModal = forwardRef(
|
||||||
const tweak = useRef<tweakType>([]);
|
const tweak = useRef<tweakType>([]);
|
||||||
const tweaksList = useRef<string[]>([]);
|
const tweaksList = useRef<string[]>([]);
|
||||||
const { setTweak, getTweak, tabsState } = useContext(TabsContext);
|
const { setTweak, getTweak, tabsState } = useContext(TabsContext);
|
||||||
const pythonApiCode = getPythonApiCode(flow, autoLogin, tweak.current, tabsState);
|
const pythonApiCode = getPythonApiCode(
|
||||||
|
flow,
|
||||||
|
autoLogin,
|
||||||
|
tweak.current,
|
||||||
|
tabsState
|
||||||
|
);
|
||||||
const curl_code = getCurlCode(flow, autoLogin, tweak.current, tabsState);
|
const curl_code = getCurlCode(flow, autoLogin, tweak.current, tabsState);
|
||||||
const pythonCode = getPythonCode(flow, tweak.current, tabsState);
|
const pythonCode = getPythonCode(flow, tweak.current, tabsState);
|
||||||
const widgetCode = getWidgetCode(flow, autoLogin, tabsState);
|
const widgetCode = getWidgetCode(flow, autoLogin, tabsState);
|
||||||
|
|
@ -152,10 +157,15 @@ const ApiModal = forwardRef(
|
||||||
tweak.current.push(newTweak);
|
tweak.current.push(newTweak);
|
||||||
}
|
}
|
||||||
|
|
||||||
const pythonApiCode = getPythonApiCode(flow, autoLogin ,tweak.current, tabsState);
|
const pythonApiCode = getPythonApiCode(
|
||||||
|
flow,
|
||||||
|
autoLogin,
|
||||||
|
tweak.current,
|
||||||
|
tabsState
|
||||||
|
);
|
||||||
const curl_code = getCurlCode(flow, autoLogin, tweak.current, tabsState);
|
const curl_code = getCurlCode(flow, autoLogin, tweak.current, tabsState);
|
||||||
const pythonCode = getPythonCode(flow, tweak.current, tabsState);
|
const pythonCode = getPythonCode(flow, tweak.current, tabsState);
|
||||||
const widgetCode = getWidgetCode(flow, autoLogin,tabsState);
|
const widgetCode = getWidgetCode(flow, autoLogin, tabsState);
|
||||||
|
|
||||||
tabs![0].code = curl_code;
|
tabs![0].code = curl_code;
|
||||||
tabs![1].code = pythonApiCode;
|
tabs![1].code = pythonApiCode;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export default function SignUp(): JSX.Element {
|
||||||
const [inputState, setInputState] =
|
const [inputState, setInputState] =
|
||||||
useState<signUpInputStateType>(CONTROL_INPUT_STATE);
|
useState<signUpInputStateType>(CONTROL_INPUT_STATE);
|
||||||
|
|
||||||
const [isDisabled, setDisableBtn] = useState<boolean>(true)
|
const [isDisabled, setDisableBtn] = useState<boolean>(true);
|
||||||
|
|
||||||
const { password, cnfPassword, username } = inputState;
|
const { password, cnfPassword, username } = inputState;
|
||||||
const { setErrorData, setSuccessData } = useContext(alertContext);
|
const { setErrorData, setSuccessData } = useContext(alertContext);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue