From acee5bc491ec3d1dbcfa5fb76b7047ce3ee7cf01 Mon Sep 17 00:00:00 2001 From: Morgan Senechal Date: Mon, 25 Nov 2024 19:14:44 +0000 Subject: [PATCH] feat: Added favicon + documentation link --- public/vite.svg | 20 +++++++++++++++++++- src/landingPage/Home.tsx | 1 + src/templates/shared/components/Header.tsx | 10 ++++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/public/vite.svg b/public/vite.svg index e7b8dfb1b..ad9b2f607 100644 --- a/public/vite.svg +++ b/public/vite.svg @@ -1 +1,19 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + diff --git a/src/landingPage/Home.tsx b/src/landingPage/Home.tsx index f14674b6f..c4a68500b 100644 --- a/src/landingPage/Home.tsx +++ b/src/landingPage/Home.tsx @@ -14,6 +14,7 @@ export default function QuickStarter() { activeNavItem={activeTab} setActiveNavItem={setActiveTab} userHeader={false} + documentation='https://neo4j.com/labs/neo4j-needle-starterkit/' />
diff --git a/src/templates/shared/components/Header.tsx b/src/templates/shared/components/Header.tsx index f0ff07b10..d0895796b 100644 --- a/src/templates/shared/components/Header.tsx +++ b/src/templates/shared/components/Header.tsx @@ -1,6 +1,6 @@ import { MoonIconOutline, SunIconOutline, QuestionMarkCircleIconOutline } from '@neo4j-ndl/react/icons'; import { Typography, IconButton, Tabs, Switch, Logo } from '@neo4j-ndl/react'; -import React, { useState } from 'react'; +import React, { useState, useCallback } from 'react'; import { ThemeWrapperContext } from '../../../context/ThemeWrapper'; import User from './User'; @@ -14,6 +14,7 @@ export default function Header({ setConnectNeo4j = () => {}, openConnectionModal = () => {}, userHeader = true, + documentation = "", }: { title: string; navItems?: string[]; @@ -24,6 +25,7 @@ export default function Header({ setConnectNeo4j?: (connectNeo4j: boolean) => void; openConnectionModal?: () => void; userHeader?: boolean; + documentation?: string; }) { const themeUtils = React.useContext(ThemeWrapperContext); const [themeMode, setThemeMode] = useState(themeUtils.colorMode); @@ -35,6 +37,10 @@ export default function Header({ themeUtils.toggleColorMode(); }; + const handleURLClick = useCallback((url: string) => { + window.open(url, '_blank'); + }, []); + return (