🐛 fix(components): remove unnecessary empty line in ToggleComponent

🐛 fix(modals): fix typo in comment in CodeAreaModal
🐛 fix(pages): remove unnecessary empty line in MainPage
🐛 fix(utils): remove unnecessary semicolons in utils.ts
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-21 11:17:13 -03:00
commit dff5c87c72
4 changed files with 6 additions and 7 deletions

View file

@ -8,7 +8,6 @@ export default function ToggleComponent({
setEnabled,
disabled,
}: ToggleComponentType) {
// set component state as disabled
useEffect(() => {
if (disabled) {

View file

@ -39,7 +39,7 @@ export default function CodeAreaModal({
}
}
// Check for custom code errors
// Check for custom code errors
function handleClick() {
postValidateCode(code)
.then((apiReturn) => {

View file

@ -8,7 +8,7 @@ import { TabsContext } from "../../contexts/tabsContext";
export default function HomePage() {
const { flows, setTabId, downloadFlows, uploadFlows, addFlow, removeFlow } =
useContext(TabsContext);
// Set a null id
useEffect(() => {
setTabId("");

View file

@ -259,7 +259,7 @@ export function getRandomKeyByssmm(): string {
export function varHighlightHTML({ name }: IVarHighlightType): string {
const html = `<span class="font-semibold chat-message-highlight">{${name}}</span>`;
return html;
};
}
export function buildTweakObject(tweak) {
tweak.forEach((el) => {
@ -331,7 +331,7 @@ def run_flow(inputs: dict, flow_id: str, tweaks: Optional[dict] = None) -> dict:
# Setup any tweaks you want to apply to the flow
inputs = ${inputs}
print(run_flow(inputs, flow_id=FLOW_ID, tweaks=TWEAKS))`;
};
}
/**
* Function to get the curl code for the API
@ -357,7 +357,7 @@ export function getCurlCode(
? buildTweakObject(tweak)
: JSON.stringify(tweaks, null, 2)
}}'`;
};
}
/**
* Function to get the python code for the API
@ -382,4 +382,4 @@ flow = load_flow_from_json("${flowName}.json", tweaks=TWEAKS)
# Now you can use it like any chain
inputs = ${inputs}
flow(inputs)`;
};
}