diff --git a/apps/client-ts/src/components/Nav/main-nav-sm.tsx b/apps/client-ts/src/components/Nav/main-nav-sm.tsx index 84c22e3bf..9a12966f7 100644 --- a/apps/client-ts/src/components/Nav/main-nav-sm.tsx +++ b/apps/client-ts/src/components/Nav/main-nav-sm.tsx @@ -13,11 +13,7 @@ import { useState } from "react" import Link from "next/link" -export function SmallNav({ - onLinkClick -} : { - onLinkClick: (name: string) => void -}) { +export function SmallNav() { const [selectedItem, setSelectedItem] = useState("dashboard"); const [open, setOpen] = useState(false); const navItemClassName = (itemName: string) => @@ -27,7 +23,7 @@ export function SmallNav({ function click(name: string) { setSelectedItem(name); - onLinkClick(name); + //onLinkClick(name); setOpen(false); } return ( @@ -59,32 +55,36 @@ export function SmallNav({ >

Dashboard

*/} - click('connections')} + href="/connections" >

Connections

-
- + click('events')} + href="/events" >

Events

-
- + click('configuration')} + href="/configuration" >

Configuration

-
- + click('api-keys')} + href="/api-keys" >

API Keys

-
- +

Docs

-
+ diff --git a/apps/client-ts/src/components/Nav/main-nav.tsx b/apps/client-ts/src/components/Nav/main-nav.tsx index 91a87b18e..97746665e 100644 --- a/apps/client-ts/src/components/Nav/main-nav.tsx +++ b/apps/client-ts/src/components/Nav/main-nav.tsx @@ -2,13 +2,12 @@ import { usePathname } from "next/navigation"; import { MouseEvent, useEffect, useState } from "react"; +import Link from "next/link" export function MainNav({ - onLinkClick, className, ...props }: { - onLinkClick: (name: string) => void; className: string; }) { const [selectedItem, setSelectedItem] = useState("connections"); @@ -24,7 +23,7 @@ export function MainNav({ function click(e: MouseEvent, name: string) { e.preventDefault(); - onLinkClick(name); + //onLinkClick(name); } return ( @@ -32,31 +31,35 @@ export function MainNav({ className={`flex flex-col items-start ${className}`} {...props} > - click(e,'connections')} + href="/connections" > Connections - - + click(e, 'events')} + href="/events" > Events - - + click(e,'configuration')} + href="/configuration" > Configuration - - + click(e,'api-keys')} + href="/api-keys" > API Keys - - +

Docs

-
+ ); } diff --git a/apps/client-ts/src/components/RootLayout/index.tsx b/apps/client-ts/src/components/RootLayout/index.tsx index 2e57087f7..eea32b680 100644 --- a/apps/client-ts/src/components/RootLayout/index.tsx +++ b/apps/client-ts/src/components/RootLayout/index.tsx @@ -9,6 +9,7 @@ import Link from 'next/link' import { useRouter } from 'next/navigation'; import config from '@/lib/config'; + const useDeviceSize = () => { const [width, setWidth] = useState(0) @@ -35,21 +36,22 @@ export const RootLayout = () => { const [width, height] = useDeviceSize(); const router = useRouter() const base = process.env.NEXT_PUBLIC_WEBAPP_DOMAIN; - const handlePageChange = (page: string) => { + console.log('WEBAPP DOMAIN is '+ base) + /*const handlePageChange = (page: string) => { console.log(`${base}/${page}`) if (page) { router.push(`${base}/${page}`); } else { console.error(`Page ${page} is undefined`); } - }; + };*/ const lgBreakpoint = 1024; // Tailwind's 'lg' breakpoint return (
{width < lgBreakpoint ? ( - + ) : (
@@ -61,7 +63,6 @@ export const RootLayout = () => { { config.DISTRIBUTION == "managed" &&