Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
✨ (index.tsx): introduce flowId variable to improve readability and a…
…void repetitive code
  • Loading branch information
Cristhianzl committed Sep 1, 2025
commit 437fa1d624e5c5e6e43699cf0b674568f8ec0785
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as the endpoint name is supposed to replace the current flow ID, wouldn't it make more sense to put the current flow ID as an alternative to when the endpoint name is null?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! thanks!

Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ export default function CopyFieldAreaComponent({
const setSuccessData = useAlertStore((state) => state.setSuccessData);
const currentFlow = useFlowStore((state) => state.currentFlow);
const endpointName = currentFlow?.endpoint_name ?? "";
const flowId =
currentFlow?.endpoint_name && currentFlow?.id ? currentFlow?.id : "";

const valueToRender = useMemo(() => {
if (value === BACKEND_URL) {
return `${URL_WEBHOOK}${endpointName}${currentFlow?.id ?? ""}`;
return `${URL_WEBHOOK}${endpointName}${flowId}`;
} else if (value === MCP_SSE_VALUE) {
return `${URL_MCP_SSE}`;
}
Expand Down
Loading