Skip to content

Commit fe7064a

Browse files
authored
Merge pull request #156 from medusajs/fix-loading
fix: homepage performance
2 parents 43e760b + 04aa4c3 commit fe7064a

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

public/hero.jpg

-1.72 MB
Binary file not shown.

public/hero.webp

566 KB
Binary file not shown.

src/modules/home/components/hero/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ const Hero = () => {
66
<div className="h-[90vh] w-full relative">
77
<div className="text-white absolute inset-0 z-10 flex flex-col justify-center items-center text-center small:text-left small:justify-end small:items-start small:p-32">
88
<h1 className="text-2xl-semi mb-4 drop-shadow-md shadow-black">
9-
Summer styles are finally here
9+
Introducing the Latest Summer Styles
1010
</h1>
1111
<p className="text-base-regular max-w-[32rem] mb-6 drop-shadow-md shadow-black">
12-
This year, our new summer collection will shelter you from the harsh
13-
elements of a world that doesn&apos;t care if you live or die.
12+
This season, our new summer collection embraces designs to provide
13+
comfort and style - ensuring you&apos;re well-prepared for whatever
14+
comes your way.
1415
</p>
1516
<UnderlineLink href="/store">Explore products</UnderlineLink>
1617
</div>
1718
<Image
18-
src="/hero.jpg"
19+
src="/hero.webp"
1920
loading="eager"
2021
priority={true}
2122
quality={90}

src/modules/layout/templates/nav/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { useEffect, useState } from "react"
1313

1414
const Nav = () => {
1515
const pathname = usePathname()
16-
const [isHome, setIsHome] = useState(false)
16+
const [isHome, setIsHome] = useState(true)
1717
const [isScrolled, setIsScrolled] = useState(false)
1818

1919
//useEffect that detects if window is scrolled > 5px on the Y axis

0 commit comments

Comments
 (0)