This commit is contained in:
anovazzi1 2023-05-30 00:16:30 -03:00
commit 8a2cf0f721
3 changed files with 18 additions and 17 deletions

View file

@ -21,24 +21,24 @@ import { v4 as uuidv4 } from "uuid";
import { addEdge } from "reactflow"; import { addEdge } from "reactflow";
const TabsContextInitialValue: TabsContextType = { const TabsContextInitialValue: TabsContextType = {
save: () => { }, save: () => {},
tabIndex: 0, tabIndex: 0,
setTabIndex: (index: number) => { }, setTabIndex: (index: number) => {},
flows: [], flows: [],
removeFlow: (id: string) => { }, removeFlow: (id: string) => {},
addFlow: (flowData?: any) => { }, addFlow: (flowData?: any) => {},
updateFlow: (newFlow: FlowType) => { }, updateFlow: (newFlow: FlowType) => {},
incrementNodeId: () => uuidv4(), incrementNodeId: () => uuidv4(),
downloadFlow: (flow: FlowType) => { }, downloadFlow: (flow: FlowType) => {},
uploadFlow: () => { }, uploadFlow: () => {},
hardReset: () => { }, hardReset: () => {},
disableCopyPaste: false, disableCopyPaste: false,
setDisableCopyPaste: (state: boolean) => { }, setDisableCopyPaste: (state: boolean) => {},
getNodeId: () => "", getNodeId: () => "",
paste: ( paste: (
selection: { nodes: any; edges: any }, selection: { nodes: any; edges: any },
position: { x: number; y: number } position: { x: number; y: number }
) => { }, ) => {},
}; };
export const TabsContext = createContext<TabsContextType>( export const TabsContext = createContext<TabsContextType>(
@ -109,7 +109,7 @@ export function TabsProvider({ children }: { children: ReactNode }) {
templates[node.data.type]["description"]; templates[node.data.type]["description"];
node.data.node.template = updateTemplate( node.data.node.template = updateTemplate(
templates[node.data.type][ templates[node.data.type][
"template" "template"
] as unknown as APITemplateType, ] as unknown as APITemplateType,
node.data.node.template as APITemplateType node.data.node.template as APITemplateType

View file

@ -1,8 +1,9 @@
import React, { forwardRef } from "react"; import React, { forwardRef } from "react";
import { ReactComponent as SerperSVG } from "./serper.svg"; import { ReactComponent as SerperSVG } from "./serper.svg";
export const SerperIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>( export const SerperIcon = forwardRef<
(props, ref) => { SVGSVGElement,
return <SerperSVG ref={ref} {...props} />; React.PropsWithChildren<{}>
} >((props, ref) => {
); return <SerperSVG ref={ref} {...props} />;
});