import { useEffect, useState } from "react"; import hamburgerIcon from "../assets/hamburger.svg"; function TopNav({ onMenuClick }) { const [injectionType, setInjectionType] = useState("LICENSE"); useEffect(() => { chrome.storage.local.get("injection_type", (result) => { if (result.injection_type) { setInjectionType(result.injection_type); } }); }, []); const handleInjectionTypeChange = (type) => { chrome.storage.local.set({ injection_type: type }, () => { if (chrome.runtime.lastError) { console.error( "Error updating injection_type:", chrome.runtime.lastError ); } else { setInjectionType(type); console.log(`Injection type updated to ${type}`); } }); }; return (
Injection Type: