+
+
+ BlitzKit
+
+
+ Everything World of Tanks Blitz
+
+
+
+
+ {
+ if (!search.current) return;
+
+ const sanitized = search.current.value.trim();
+
+ if (sanitized.length > 0) {
+ setShowSearch(true);
+ setSearching(true);
+ performSearch();
+ } else {
+ setShowSearch(false);
+ }
+ }}
+ onFocus={() => {
+ if (!search.current) return;
+
+ const sanitized = search.current.value.trim();
+ setShowSearch(sanitized.length > 0);
+
+ window.scrollTo({
+ top:
+ search.current.getBoundingClientRect().top -
+ NAVBAR_HEIGHT -
+ 32,
+ behavior: 'smooth',
+ });
+ }}
+ >
+
+
+
+
+ {showSearch && (
+
+ {
+ if (!search.current) return;
+
+ search.current.value = '';
+ setShowSearch(false);
+ }}
+ >
+
+
+
+ )}
+
+
+ {showSearch && (
+
+ {searching && (
+
+
+
+ )}
+
+ {!searching && searchResults && (
+ <>
+
+
+
+
+ Tankopedia
+
+
+
+
+
+ {searchResults.tanks.map((tank) => (
+
+
+
+
+
+ ))}
+
+ {searchResults.tanks.length === 0 && (
+
+ No tanks found
+
+ )}
+
+
+
+
+ Players
+
+
+ {searchResults.players.map((player) => (
+
+
+
+
+
+ ))}
+
+ {searchResults.players.length === 0 && (
+
+ No players found
+
+ )}
+
+
+
+ >
+ )}
+
+ )}
+
+
+