Skip to content

Commit 21ca922

Browse files
refactor(pages/index): apply new home hero
1 parent 9b35261 commit 21ca922

File tree

1 file changed

+4
-40
lines changed

1 file changed

+4
-40
lines changed

src/pages/index.tsx

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
Heading,
1111
HeadingProps,
1212
Icon,
13-
Img,
1413
SimpleGridProps,
1514
Stack,
1615
useToken,
@@ -25,14 +24,13 @@ import CalloutBanner from "../components/CalloutBanner"
2524
import CodeModal from "../components/CodeModal"
2625
import Codeblock from "../components/Codeblock"
2726
import CommunityEvents from "../components/CommunityEvents"
28-
import Morpher from "../components/Morpher"
2927
import PageMetadata from "../components/PageMetadata"
3028
import StatsBoxGrid from "../components/StatsBoxGrid"
3129
import Translation from "../components/Translation"
3230
import TitleCardList, { ITitleCardItem } from "../components/TitleCardList"
33-
import Text from "../components/OldText"
3431
import GatsbyImage from "../components/GatsbyImage"
3532
import WritersCohortBanner from "../components/Banners/Implementations/WritersCohortBanner"
33+
import { HomeHero } from "../components/Hero"
3634

3735
import { isLangRightToLeft } from "../utils/translations"
3836
import { getImage } from "../utils/image"
@@ -153,30 +151,6 @@ const ButtonLinkRow = (props: ChildOnlyProp) => (
153151
/>
154152
)
155153

156-
const PageHeader = () => (
157-
<Flex
158-
as="header"
159-
flexDirection="column"
160-
alignItems="center"
161-
textAlign="center"
162-
mt={4}
163-
mb={8}
164-
px={8}
165-
>
166-
<Heading as="h1" fontSize={{ base: "2rem", sm: "2.5rem" }}>
167-
<Translation id="page-index-title" />
168-
</Heading>
169-
<Text color="text200" maxW="55ch" fontSize="xl" mt={4}>
170-
<Translation id="page-index-description" />
171-
</Text>
172-
<ButtonLinkRow>
173-
<ButtonLink to="/learn/">
174-
<Translation id="page-index-title-button" />
175-
</ButtonLink>
176-
</ButtonLinkRow>
177-
</Flex>
178-
)
179-
180154
const HomePage = ({
181155
data,
182156
pageContext: { language = "en" },
@@ -288,19 +262,9 @@ const HomePage = ({
288262
title={t("page-index-meta-title")}
289263
description={t("page-index-meta-description")}
290264
/>
291-
<GatsbyImage
292-
image={getImage(data.hero)!}
293-
alt={t("page-index-hero-image-alt")}
294-
loading="eager"
295-
width="full"
296-
minH="380px"
297-
maxH="440px"
298-
backgroundSize="cover"
299-
background="no-repeat 50px"
300-
mb={8}
301-
/>
302-
<Morpher />
303-
<PageHeader />
265+
<Box w="full">
266+
<HomeHero heroImgSrc={getImage(data.hero)!} />
267+
</Box>
304268
{/* Getting Started Section */}
305269
<GrayContainer>
306270
<ContentBox>

0 commit comments

Comments
 (0)