From 40627cc649b211e7632b0ef7b24c82481c077d50 Mon Sep 17 00:00:00 2001 From: jr-boney Date: Fri, 22 Nov 2024 01:29:01 +0530 Subject: [PATCH] commit --- app/page.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index a63de7a..735eb70 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,14 +1,13 @@ -"use client"; // Mark this file as a client component since it uses React hooks +'use client' import { useState } from 'react'; import SearchBar from '../components/SearchBar'; import DorkList from '../components/DorkList'; -import Tooltip from '../components/Tooltip'; const Home = () => { // Set the categories and dorks const [domain, setDomain] = useState(''); - const [selectedCategory, setSelectedCategory] = useState('directoryLeaks'); + const [selectedCategory, setSelectedCategory] = useState('directoryLeaks'); // Define dorks by category const dorksByCategory = { @@ -152,12 +151,9 @@ const Home = () => { 'inurl:"/api/" "client_secret"', ], }; - - - // Handle category change const handleCategoryChange = (event: React.ChangeEvent) => { - setSelectedCategory(event.target.value); + setSelectedCategory(event.target.value as keyof typeof dorksByCategory); // Type assertion }; const handleDomainChange = (newDomain: string) => {