Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jr-boney committed Nov 21, 2024
1 parent 3217652 commit 40627cc
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -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<keyof typeof dorksByCategory>('directoryLeaks');

// Define dorks by category
const dorksByCategory = {
Expand Down Expand Up @@ -152,12 +151,9 @@ const Home = () => {
'inurl:"/api/" "client_secret"',
],
};



// Handle category change
const handleCategoryChange = (event: React.ChangeEvent<HTMLSelectElement>) => {
setSelectedCategory(event.target.value);
setSelectedCategory(event.target.value as keyof typeof dorksByCategory); // Type assertion
};

const handleDomainChange = (newDomain: string) => {
Expand Down

0 comments on commit 40627cc

Please sign in to comment.