fix: no scroll on desktop

This commit is contained in:
TrèsAbhi committed 2024-05-23 13:20:07 -05:00
1 parent 4206395f49
commit 96b4ab4380
2 files changed
+6 -4

No files matched your search

+2 -1
View File
@@ -19,6 +19,7 @@ import {
import { go } from 'fuzzysort';
import { debounce } from 'lodash';
import { useRef, useState } from 'react';
import { isMobile } from 'react-device-detect';
import { NAVBAR_HEIGHT } from '../../components/Navbar';
import { UNLOCALIZED_REGION_NAMES_SHORT } from '../../constants/regions';
import searchPlayersAcrossRegions, {
@@ -144,7 +145,7 @@ export function Hero() {
}
}}
onFocus={() => {
if (!search.current) return;
if (!search.current || !isMobile) return;
const sanitized = search.current.value.trim();
setShowSearch(sanitized.length > 0);