Skip to content

Commit 2fd0557

Browse files
committed
fix: HubHero height
1 parent 3f6d515 commit 2fd0557

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

src/components/Hero/HubHero/index.tsx

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
import * as React from "react"
2-
import { Box, Heading, HStack, Stack, Text } from "@chakra-ui/react"
1+
import {
2+
Box,
3+
Heading,
4+
HStack,
5+
Stack,
6+
Text,
7+
useBreakpointValue,
8+
} from "@chakra-ui/react"
39

410
import type { CommonHeroProps } from "@/lib/types"
511

@@ -15,14 +21,22 @@ const HubHero = (props: CommonHeroProps) => {
1521
)
1622
}
1723

24+
const height = useBreakpointValue({
25+
base: "192px",
26+
md: "256px",
27+
lg: "320px",
28+
xl: "576px",
29+
"2xl": "672px",
30+
})
31+
1832
return (
1933
<Box position="relative">
2034
<Image
2135
src={heroImg}
2236
alt=""
2337
priority
2438
sizes="100vw"
25-
style={{ width: "100vw", objectFit: "cover", height: "auto" }}
39+
style={{ width: "100vw", objectFit: "cover", height }}
2640
/>
2741
<Stack
2842
spacing={{ base: "3", md: "4" }}

0 commit comments

Comments
 (0)