feat(logo): clicking logo resets search query

This commit is contained in:
BraveOPotato
2026-07-08 02:43:08 -05:00
parent f521302ef5
commit ff84547113
3 changed files with 12 additions and 2 deletions
+1
View File
@@ -33,6 +33,7 @@ export default function App() {
<Header
toolCount={tools.length}
categoryCount={Math.max(0, categories.length - 1)}
setSearchQuery={setSearchQuery}
/>
<Controls
+10 -2
View File
@@ -4,9 +4,14 @@ import { useModal } from "../hooks/useModal";
interface HeaderProps {
toolCount: number;
categoryCount: number;
setSearchQuery: (query: string) => void;
}
export function Header({ toolCount, categoryCount }: HeaderProps) {
export function Header({
toolCount,
categoryCount,
setSearchQuery,
}: HeaderProps) {
const { showModalWithID } = useModal();
const [starsCount, setStarsCount] = useState(0);
@@ -35,7 +40,10 @@ export function Header({ toolCount, categoryCount }: HeaderProps) {
</div>
<div className="header-grid">
<div className="brand-block">
<h1>
<h1
style={{ cursor: "pointer" }}
onClick={() => setSearchQuery("")}
>
<span className="fck glitch" data-text="F*CK">
F*CK
</span>
+1
View File
@@ -158,6 +158,7 @@ body::after {
}
h1 {
width: fit-content;
font-family: var(--font-display);
font-size: clamp(2.5rem, 6vw, 5rem);
font-weight: 700;