Skip to content

Commit

Permalink
Components: Housekeeping, fixed links in layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Schwarz committed Aug 14, 2023
1 parent 8206546 commit 99fcc5d
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/component-library/Pages/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import { HiUserCircle, HiBell } from "react-icons/hi2"
import { HiMenu, HiChevronDown } from "react-icons/hi"
import { twMerge } from "tailwind-merge"

import { useState, useEffect, useRef, forwardRef } from "react"
import React, { useState, useEffect, useRef, forwardRef } from "react"
import { Collapsible } from "../../Helpers/Collapsible"
import { AccountDropdown } from "./AccountDropdown"
import Link from "next/link"

export interface LayoutViewModel {
accountActive: string,
Expand Down Expand Up @@ -39,7 +40,7 @@ export const Layout = (
const [isMouseOver, setIsMouseOver] = useState(false)
const LinkElem = (props: { href: string, children: React.ReactNode }) => {
return (
<a
<Link
href={props.href}
className={twMerge(
"w-full p-1 rounded-sm hover:cursor-pointer",
Expand All @@ -50,7 +51,7 @@ export const Layout = (

>
{props.children}
</a>
</Link>
)
}

Expand Down Expand Up @@ -176,9 +177,9 @@ export const Layout = (
/>
<SearchDropdown inputSelected={isSearching} searchstring={searchString} ref={searchMenuRef} />
</span>
<HeaderLinks href="/createrule" onFocus={() => setIsSearching(false)}>Create Rule</HeaderLinks>
<HeaderLinks href="/dids">List DIDs</HeaderLinks>
<HeaderLinks href="/rules">List Rules</HeaderLinks>
<HeaderLinks href="/rule/create" onFocus={() => setIsSearching(false)}>Create Rule</HeaderLinks>
<HeaderLinks href="/did/list">List DIDs</HeaderLinks>
<HeaderLinks href="/rule/list">List Rules</HeaderLinks>
</span>
<span className="flex space-x-2 items-end relative">
<a
Expand Down Expand Up @@ -207,9 +208,9 @@ export const Layout = (
<nav
className="w-full flex flex-col md:hidden items-start space-y-2 divide-y divide-gray-600 border-t border-gray-600 "
>
<HeaderLinks href="/createrule" className="w-full pt-2">Create Rule</HeaderLinks>
<HeaderLinks href="/dids" className="w-full pt-2">List DIDs</HeaderLinks>
<HeaderLinks href="/rules" className="w-full pt-2">List Rules</HeaderLinks>
<HeaderLinks href="/rule/create" className="w-full pt-2">Create Rule</HeaderLinks>
<HeaderLinks href="/did/list" className="w-full pt-2">List DIDs</HeaderLinks>
<HeaderLinks href="/rule/list" className="w-full pt-2">List Rules</HeaderLinks>
<HeaderLinks href="/notifications" className="w-full pt-2"><span className="flex justify-between items-center">Notifications <HiBell /></span></HeaderLinks>
</nav>
</Collapsible>
Expand Down

0 comments on commit 99fcc5d

Please sign in to comment.