mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 06:42:21 +08:00
🐛 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:
@ -8,7 +8,6 @@ export default function ToggleComponent({
|
||||
setEnabled,
|
||||
disabled,
|
||||
}: ToggleComponentType) {
|
||||
|
||||
// set component state as disabled
|
||||
useEffect(() => {
|
||||
if (disabled) {
|
||||
|
||||
@ -39,7 +39,7 @@ export default function CodeAreaModal({
|
||||
}
|
||||
}
|
||||
|
||||
// Check for custom code errors
|
||||
// Check for custom code errors
|
||||
function handleClick() {
|
||||
postValidateCode(code)
|
||||
.then((apiReturn) => {
|
||||
|
||||
@ -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("");
|
||||
|
||||
@ -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)`;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user