diff --git a/app/layout.tsx b/app/layout.tsx
index a0b985ba..141d0f53 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -2,11 +2,10 @@
import "./globals.css";
import { Inter } from "next/font/google";
-import { Toaster } from "@/components/ui/toaster";
import { Metadata } from "next";
+import { Toaster } from "@/components/ui/toaster";
import NextAuthProvider from "./providers";
import GTM from "./GTM";
-import { cn } from "@/lib/utils";
const inter = Inter({ subsets: ["latin"] });
@@ -25,7 +24,7 @@ export default function RootLayout({
// caused by mismatched client/server content caused by next-themes
return (
-
+
{children}
diff --git a/app/schema/SchemaDataPanel.tsx b/app/schema/SchemaDataPanel.tsx
index dc73e7f9..bc36331d 100644
--- a/app/schema/SchemaDataPanel.tsx
+++ b/app/schema/SchemaDataPanel.tsx
@@ -3,7 +3,7 @@
"use client";
-import { Check, ChevronRight, MinusCircle, Pencil, PlusCircle, Trash2, X } from "lucide-react";
+import { Check, ChevronRight, Pencil, PlusCircle, Trash2, X } from "lucide-react";
import { useEffect, useState } from "react";
import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
import { Checkbox } from "@/components/ui/checkbox";
@@ -33,8 +33,6 @@ export default function SchemaDataPanel({ obj, onExpand, onSetAttributes, onRemo
const [isAddValue, setIsAddValue] = useState(false)
const { toast } = useToast()
- console.log(editable);
-
useEffect(() => {
setAttributes(Object.entries(obj.data).filter(([key, val]) => !(key === "name" && Number(val) === obj.id)).map(([key, val]) => [key, Array.isArray(val) ? val : (val as string).split(',')]))
setLabel("source" in obj ? obj.label : obj.category)
@@ -46,7 +44,6 @@ export default function SchemaDataPanel({ obj, onExpand, onSetAttributes, onRemo
}
setAttribute([key, val])
- debugger
setEditable(key)
}
@@ -65,7 +62,7 @@ export default function SchemaDataPanel({ obj, onExpand, onSetAttributes, onRemo
const oldAttribute = attributes.find(([key]) => key === newAttribute[0])
if (ok) {
- setAttributes(prev => prev.map((att) => att[0] === newAttribute[0] ? newAttribute : att))
+ setAttributes(prev => prev.map((attr) => attr[0] === newAttribute[0] ? newAttribute : attr))
handleSetEditable()
toast({
title: "Success",
@@ -80,12 +77,12 @@ export default function SchemaDataPanel({ obj, onExpand, onSetAttributes, onRemo
const ok = await onRemoveAttribute(key)
if (ok) {
- const attribute = attributes.find(([k]) => k === key)
+ const att = attributes.find(([k]) => k === key)
setAttributes(prev => prev.filter(([k]) => k !== key))
toast({
title: "Success",
description: "Attribute removed",
- action: attribute && handleAddAttribute(attribute)} />,
+ action: att && handleAddAttribute(att)} />,
})
setAttribute(getDefaultAttribute())
}
diff --git a/app/schema/SchemaView.tsx b/app/schema/SchemaView.tsx
index 00ae3b8a..9dfc6489 100644
--- a/app/schema/SchemaView.tsx
+++ b/app/schema/SchemaView.tsx
@@ -16,7 +16,6 @@ import Labels from "../graph/labels"
import { Category, Graph, Link, Node, GraphData } from "../api/graph/model"
import Button from "../components/ui/Button"
import CreateElement from "./SchemaCreateElement"
-import ToastButton from "../components/ToastButton"
const ForceGraph = dynamic(() => import("../components/ForceGraph"), { ssr: false })