Fixed bug: flow not showing
This commit is contained in:
parent
81dba95720
commit
3667f4812e
3 changed files with 43 additions and 59 deletions
|
|
@ -363,7 +363,7 @@ export default function Page({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-full overflow-hidden">
|
<div className="flex h-full overflow-hidden">
|
||||||
{view && <ExtraSidebar />}
|
{!view && <ExtraSidebar />}
|
||||||
{/* Main area */}
|
{/* Main area */}
|
||||||
<main className="flex flex-1">
|
<main className="flex flex-1">
|
||||||
{/* Primary column */}
|
{/* Primary column */}
|
||||||
|
|
@ -372,21 +372,6 @@ export default function Page({
|
||||||
{Object.keys(templates).length > 0 &&
|
{Object.keys(templates).length > 0 &&
|
||||||
Object.keys(types).length > 0 ? (
|
Object.keys(types).length > 0 ? (
|
||||||
<div className="h-full w-full">
|
<div className="h-full w-full">
|
||||||
{view ? (
|
|
||||||
<ReactFlow
|
|
||||||
nodes={nodes}
|
|
||||||
edges={edges}
|
|
||||||
className="theme-attribution"
|
|
||||||
minZoom={0.01}
|
|
||||||
maxZoom={8}
|
|
||||||
>
|
|
||||||
<Background className="" />
|
|
||||||
<Controls
|
|
||||||
className="bg-muted fill-foreground stroke-foreground text-primary
|
|
||||||
[&>button]:border-b-border hover:[&>button]:bg-border"
|
|
||||||
></Controls>
|
|
||||||
</ReactFlow>
|
|
||||||
) : (
|
|
||||||
<ReactFlow
|
<ReactFlow
|
||||||
nodes={nodes}
|
nodes={nodes}
|
||||||
onMove={() => {
|
onMove={() => {
|
||||||
|
|
@ -427,8 +412,7 @@ export default function Page({
|
||||||
[&>button]:border-b-border hover:[&>button]:bg-border"
|
[&>button]:border-b-border hover:[&>button]:bg-border"
|
||||||
></Controls>
|
></Controls>
|
||||||
</ReactFlow>
|
</ReactFlow>
|
||||||
)}
|
{!view && (
|
||||||
{view && (
|
|
||||||
<Chat flow={flow} reactFlowInstance={reactFlowInstance} />
|
<Chat flow={flow} reactFlowInstance={reactFlowInstance} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ export default function FlowPage() {
|
||||||
{flows.length > 0 &&
|
{flows.length > 0 &&
|
||||||
tabId !== "" &&
|
tabId !== "" &&
|
||||||
flows.findIndex((flow) => flow.id === tabId) !== -1 && (
|
flows.findIndex((flow) => flow.id === tabId) !== -1 && (
|
||||||
<Page view flow={flows.find((flow) => flow.id === tabId)} />
|
<Page flow={flows.find((flow) => flow.id === tabId)} />
|
||||||
)}
|
)}
|
||||||
<a
|
<a
|
||||||
target={"_blank"}
|
target={"_blank"}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ export default function ViewPage() {
|
||||||
{flows.length > 0 &&
|
{flows.length > 0 &&
|
||||||
tabId !== "" &&
|
tabId !== "" &&
|
||||||
flows.findIndex((flow) => flow.id === tabId) !== -1 && (
|
flows.findIndex((flow) => flow.id === tabId) !== -1 && (
|
||||||
<Page flow={flows.find((flow) => flow.id === tabId)} />
|
<Page view flow={flows.find((flow) => flow.id === tabId)} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue