From 1803e96c58a8d880cd40a407e893552458fc00de Mon Sep 17 00:00:00 2001 From: Shan-Weaviate <137914800+Shan-Weaviate@users.noreply.github.com> Date: Wed, 13 Nov 2024 18:32:01 +0000 Subject: [PATCH] Delete --- src/theme/Navbar/index.js | 67 --------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 src/theme/Navbar/index.js diff --git a/src/theme/Navbar/index.js b/src/theme/Navbar/index.js deleted file mode 100644 index 28f2a1dab..000000000 --- a/src/theme/Navbar/index.js +++ /dev/null @@ -1,67 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import OriginalNavbar from '@theme-original/Navbar'; - - -console.log("Custom Navbar component is being rendered"); - -export default function Navbar(props) { - const [showTooltip, setShowTooltip] = useState(false); - - useEffect(() => { - // Target the existing logo element by class - const logoElement = document.querySelector('.navbar__logo'); - - if (logoElement) { - // Log to confirm logo is targeted - console.log("Navbar logo element found"); - - // Right-click event to trigger download - const handleRightClick = (e) => { - e.preventDefault(); // Prevent the default context menu - console.log("Right-click download triggered from existing logo"); - - - const link = document.createElement('a'); - link.href = '/img/site/weaviate-logo-horizontal-light-1.svg'; - link.download = 'weaviate-logo.svg'; - link.click(); - }; - - - logoElement.addEventListener('contextmenu', handleRightClick); - - - return () => { - logoElement.removeEventListener('contextmenu', handleRightClick); - }; - } - }, []); - - - const handleMouseEnter = () => setShowTooltip(true); - const handleMouseLeave = () => setShowTooltip(false); - - return ( -
- - {showTooltip && ( -
- Right-click to download the logo -
- )} -
- ); -}