From 33abb75f19bc35e54cc0b2cc7a08518ef92567a7 Mon Sep 17 00:00:00 2001 From: rudrodip Date: Mon, 25 Mar 2024 00:32:11 +0600 Subject: [PATCH 1/6] removed unused div element from dom tree --- src/components/graph/layout.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/graph/layout.tsx b/src/components/graph/layout.tsx index 2250a58..f4a9c59 100644 --- a/src/components/graph/layout.tsx +++ b/src/components/graph/layout.tsx @@ -5,9 +5,9 @@ import { themes } from "@/lib/graph"; const GraphLayout = ({ isPreview, themeName }: { isPreview: boolean; themeName: keyof typeof themes }) => { return ( -
+ <> -
+ ); }; From 7a18e2aef0c82ab1e68b932560b5cd310e7cd352 Mon Sep 17 00:00:00 2001 From: rudrodip Date: Mon, 25 Mar 2024 00:32:46 +0600 Subject: [PATCH 2/6] Update import path for toast component --- src/components/graph/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/graph/page.tsx b/src/components/graph/page.tsx index 6ff79ba..3215f77 100644 --- a/src/components/graph/page.tsx +++ b/src/components/graph/page.tsx @@ -5,7 +5,7 @@ import { getUserData } from "./_getData"; import { DataStruct } from "@/types"; import { useCurrentUser } from "@/hooks/use-current-user"; import { themes } from "@/lib/graph"; -import { toast } from "../ui/use-toast"; +import { toast } from "@/components/ui/use-toast"; // import useNotes from '@/context/NotesContext'; // import { seedUserData } from './_addData'; // import jsonData from './mock.json'; From f0a670da6fffcdc4d6c15ec2846cfba56d14ce7b Mon Sep 17 00:00:00 2001 From: rudrodip Date: Mon, 25 Mar 2024 01:13:26 +0600 Subject: [PATCH 3/6] Remove unused code for selecting themes --- src/app/dash/page.tsx | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/src/app/dash/page.tsx b/src/app/dash/page.tsx index a4def81..295a2db 100644 --- a/src/app/dash/page.tsx +++ b/src/app/dash/page.tsx @@ -17,26 +17,12 @@ import { useState } from "react"; import { AddDocumentButton } from "@/components/document/AddDocumentButton"; import { removeDocument } from "@/actions/document/removeDocument"; import { useToast } from "@/components/ui/use-toast"; -import { themes } from "@/lib/graph"; -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from "@/components/ui/select"; const Dash = () => { const { toast } = useToast(); const { kv, deleteNote, notion, setNotion, google, setGoogle, revalidateNotes } = useNotes(); const [isUpdating, setIsupdating] = useState(false); - const [selectedTheme, setSelectedTheme] = useState("solarizedDark"); - - const handleThemeChange = (value: string) => { - setSelectedTheme(value as typeof selectedTheme); - }; - const onClick = () => { setIsupdating(true); addContribution() @@ -57,28 +43,7 @@ const Dash = () => { return ( // pt-[calc(10vh)]
- - +
*/} - - +
+ + +
+
+ + {!canvasRef.current && ( +
+ )} +
); }