remove classname from edges on import
This commit is contained in:
parent
19d5445813
commit
2ba5678a1c
3 changed files with 24 additions and 22 deletions
|
|
@ -85,7 +85,9 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
if (cookie && Object.keys(templates).length > 0) {
|
if (cookie && Object.keys(templates).length > 0) {
|
||||||
let cookieObject: LangFlowState = JSON.parse(cookie);
|
let cookieObject: LangFlowState = JSON.parse(cookie);
|
||||||
cookieObject.flows.forEach((flow) => {
|
cookieObject.flows.forEach((flow) => {
|
||||||
flow.data.edges.forEach((edge) => {edge.className = "";})
|
flow.data.edges.forEach((edge) => {
|
||||||
|
edge.className = "";
|
||||||
|
});
|
||||||
flow.data.nodes.forEach((node) => {
|
flow.data.nodes.forEach((node) => {
|
||||||
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
||||||
node.data.node.base_classes =
|
node.data.node.base_classes =
|
||||||
|
|
@ -287,7 +289,9 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
const data = flow?.data ? flow.data : null;
|
const data = flow?.data ? flow.data : null;
|
||||||
const description = flow?.description ? flow.description : "";
|
const description = flow?.description ? flow.description : "";
|
||||||
if (data) {
|
if (data) {
|
||||||
data.edges.forEach((edge) => {edge.className = "";})
|
data.edges.forEach((edge) => {
|
||||||
|
edge.className = "";
|
||||||
|
});
|
||||||
data.nodes.forEach((node) => {
|
data.nodes.forEach((node) => {
|
||||||
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
||||||
node.data.node.base_classes =
|
node.data.node.base_classes =
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,7 @@ import { ReactComponent as ChromaSVG } from "./chroma.svg";
|
||||||
|
|
||||||
const ChromaIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
const ChromaIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return (
|
return <ChromaSVG ref={ref} {...props} />;
|
||||||
<ChromaSVG ref={ref} {...props} />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue