@@ -69,10 +69,10 @@ export function Query({ onSubmit, onQueryUpdate, onDeleteGraph, className = "" }
-
+
- Query
+ Run Query
From e55e0168cf841b44914129e6821f6ce3b343c477 Mon Sep 17 00:00:00 2001
From: Anchel123 <110421452+Anchel123@users.noreply.github.com>
Date: Mon, 8 Apr 2024 14:47:56 +0300
Subject: [PATCH 04/12] removing changes from the navbar branch
---
app/providers.tsx | 2 +-
components/custom/navbar.tsx | 111 ++++++++++-------------------------
2 files changed, 33 insertions(+), 80 deletions(-)
diff --git a/app/providers.tsx b/app/providers.tsx
index bfabe05f..c7bb4526 100644
--- a/app/providers.tsx
+++ b/app/providers.tsx
@@ -77,7 +77,7 @@ export default function NextAuthProvider({ children }: { children: React.ReactNo
minSize={panelSize}
onCollapse={() => { setCollapsed(true) }}
onExpand={() => { setCollapsed(false) }}>
-
+
{children}
diff --git a/components/custom/navbar.tsx b/components/custom/navbar.tsx
index 1f5f66c0..fd375722 100644
--- a/components/custom/navbar.tsx
+++ b/components/custom/navbar.tsx
@@ -1,6 +1,6 @@
/* eslint-disable jsx-a11y/anchor-is-valid */
-import { Activity, Info, LogOut, Menu, Waypoints } from "lucide-react";
-import { signOut, useSession } from "next-auth/react";
+import { Menu } from "lucide-react";
+import { useSession } from "next-auth/react";
import Link from "next/link";
import { useEffect, useState } from "react";
import { useTheme } from "next-themes";
@@ -9,7 +9,6 @@ import { cn } from "@/lib/utils"
import { Switch } from "../ui/switch";
import { Label } from "../ui/label";
import GithubMark from "./GithubMark";
-
export interface LinkDefinition {
name: string,
href: string,
@@ -17,35 +16,7 @@ export interface LinkDefinition {
onClick?: () => void
}
-const linksUp: LinkDefinition[] = [
- {
- name: "Connection Details",
- href: "/details",
- icon: (
),
- },
- {
- name: "Graph",
- href: "/graph",
- icon: (
),
- },
- {
- name: "Monitor",
- // href: "/api/monitor",
- href: "/monitor",
- icon: (
),
- },
-]
-
-const linksDown: LinkDefinition[] = [
- {
- name: "Disconnect",
- href: "",
- icon: (
),
- onClick: () => { signOut({ callbackUrl: '/login' }) }
- },
-]
-
-export default function Navbar({ collapsed, onExpand }: { collapsed: boolean, onExpand: () => void }) {
+export default function Navbar({ links, collapsed, onExpand }: { links: LinkDefinition[], collapsed: boolean, onExpand:()=>void }) {
const { status } = useSession()
const { theme, setTheme, systemTheme } = useTheme()
@@ -54,7 +25,6 @@ export default function Navbar({ collapsed, onExpand }: { collapsed: boolean, on
useEffect(() => {
setMounted(true)
}, [])
-
const setDarkMode = (val: boolean) => {
if (val) {
setTheme("dark")
@@ -66,59 +36,42 @@ export default function Navbar({ collapsed, onExpand }: { collapsed: boolean, on
const darkmode = theme === "dark" || (theme === "system" && systemTheme === "dark")
return (
- <>
-