fix exporting models

This commit is contained in:
ryanwong
2024-11-15 05:05:25 -05:00
parent a090d6ffb4
commit e636f4e181
4 changed files with 275 additions and 57 deletions
+8 -7
View File
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import { Plus, Edit2 } from 'lucide-react';
import { useFlowStore } from '../store/flowStore';
import { ModelModal } from './ModelModal';
import React, { useState } from "react";
import { Plus, Edit2 } from "lucide-react";
import { useFlowStore } from "../store/flowStore";
import { ModelModal } from "./ModelModal";
export function ModelPanel() {
const [isModalOpen, setIsModalOpen] = useState(false);
@@ -36,10 +36,11 @@ export function ModelPanel() {
<div>
<h3 className="font-medium">{model.name}</h3>
<p className="text-sm text-gray-500">
{model.fields.length} field{model.fields.length !== 1 ? 's' : ''}
{model.fields.length} field
{model.fields.length !== 1 ? "s" : ""}
</p>
</div>
<button
<button
className="p-1 hover:bg-gray-100 rounded"
onClick={(e) => {
e.stopPropagation();
@@ -63,4 +64,4 @@ export function ModelPanel() {
/>
</div>
);
}
}