Skip to content

Commit ff34db5

Browse files
committed
use Show instead of hideBelow prop to avoid rendering the sidebar on mobile
1 parent 2c05254 commit ff34db5

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

src/pages/wallets/find-wallet.tsx

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@ import { GetStaticProps, InferGetStaticPropsType } from "next"
33
import { useRouter } from "next/router"
44
import { useTranslation } from "next-i18next"
55
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
6-
import { Box, calc, Center, Flex, Text, useDisclosure } from "@chakra-ui/react"
6+
import {
7+
Box,
8+
calc,
9+
Center,
10+
Flex,
11+
Show,
12+
Text,
13+
useDisclosure,
14+
} from "@chakra-ui/react"
715

816
import type { BasePageProps, ChildOnlyProp, Wallet } from "@/lib/types"
917

@@ -223,20 +231,22 @@ const FindWalletPage = ({
223231
<Box px={{ md: 4, "2xl": 0 }}>
224232
<Flex pt={4} pb={6} gap={6}>
225233
{/* Filters sidebar */}
226-
<WalletFilterSidebar
227-
hideBelow="lg"
228-
top={calc(NAV_BAR_PX_HEIGHT).subtract("2px").toString()}
229-
{...{
230-
filters,
231-
resetWalletFilter,
232-
updateFilterOption,
233-
updateFilterOptions,
234-
resetFilters,
235-
selectedPersona,
236-
setFilters,
237-
setSelectedPersona,
238-
}}
239-
/>
234+
{/* Use `Show` instead of `hideBelow` prop to avoid rendering the sidebar on mobile */}
235+
<Show above="lg">
236+
<WalletFilterSidebar
237+
top={calc(NAV_BAR_PX_HEIGHT).subtract("2px").toString()}
238+
{...{
239+
filters,
240+
resetWalletFilter,
241+
updateFilterOption,
242+
updateFilterOptions,
243+
resetFilters,
244+
selectedPersona,
245+
setFilters,
246+
setSelectedPersona,
247+
}}
248+
/>
249+
</Show>
240250

241251
{/* Wallets table */}
242252
<Box mt={0.5} w="full">

0 commit comments

Comments
 (0)