Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit c9c8390

Browse files
author
niloo-fs
committed
fix background size
1 parent 83e3fcf commit c9c8390

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pages/p2p/components/_hero.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { Background } from 'components/elements/background-image'
88
import { LinkButton } from 'components/form'
99
import device from 'themes/device.js'
1010
import { useBrowserResize } from 'components/hooks/use-browser-resize'
11+
import { size } from 'themes/device'
1112

1213
const BackgroundWrapper = styled(Background)`
1314
height: 100%;
@@ -174,8 +175,8 @@ const query = graphql`
174175

175176
const Hero = () => {
176177
const data = useStaticQuery(query)
177-
const [is_mobile] = useBrowserResize()
178-
const background = is_mobile ? data['p2p_hero_background_mobile'] : data['p2p_hero_background']
178+
const [is_tabletL] = useBrowserResize(size.tabletL)
179+
const background = is_tabletL ? data['p2p_hero_background_mobile'] : data['p2p_hero_background']
179180

180181
return (
181182
<BackgroundWrapper data={background}>

0 commit comments

Comments
 (0)