Skip to content

Commit 20cab8a

Browse files
committed
refactor: 랜딩페이지 web vital 지표 개선 작업
1 parent 0453360 commit 20cab8a

File tree

18 files changed

+50
-15
lines changed

18 files changed

+50
-15
lines changed

next.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const nextConfig: NextConfig = {
1010
ignoreBuildErrors: false,
1111
},
1212
images: {
13+
formats: ['image/avif', 'image/webp'],
1314
remotePatterns: [
1415
{
1516
protocol: 'https',
-569 KB
Binary file not shown.
27 KB
Loading

public/landing/opening-poster.webp

103 KB
Loading

src/app/head.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default function Head() {
2+
return (
3+
<>
4+
<link rel="preload" as="image" href="/landing/opening-poster.webp" fetchPriority="high" />
5+
</>
6+
);
7+
}

src/app/page.tsx

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
1+
import dynamic from 'next/dynamic';
12
import { Header } from '@/shared/components/layout';
23
import { HeaderActions } from '@/composite/landing/headerAction';
34
import { IntroSection } from '@/composite/landing/intro';
4-
import { QuestioningSection } from '@/composite/landing/questioning';
5-
import { SuggestionSection } from '@/composite/landing/suggestion';
6-
import { StoryVideoSection } from '@/composite/landing/storyVideo';
7-
import { AddGoalFeatureSection } from '@/composite/landing/addGoal';
8-
import { ManageTodoFeatureSection } from '@/composite/landing/manageTodo';
9-
import { GoalAdviceFeatureSection } from '@/composite/landing/goalAdvice';
10-
import { CollectPlanetFeatureSection } from '@/composite/landing/collectPlanet';
11-
import { FundingDiscountSection } from '@/composite/landing/fundingDiscount';
12-
import { LaunchSection } from '@/composite/landing/launch';
13-
import DonationSection from '@/composite/landing/DonationSection';
5+
6+
const QuestioningSection = dynamic(() => import('@/composite/landing/questioning').then(mod => mod.QuestioningSection));
7+
const SuggestionSection = dynamic(() => import('@/composite/landing/suggestion').then(mod => mod.SuggestionSection));
8+
const StoryVideoSection = dynamic(() => import('@/composite/landing/storyVideo').then(mod => mod.StoryVideoSection));
9+
const AddGoalFeatureSection = dynamic(() =>
10+
import('@/composite/landing/addGoal').then(mod => mod.AddGoalFeatureSection)
11+
);
12+
const ManageTodoFeatureSection = dynamic(() =>
13+
import('@/composite/landing/manageTodo').then(mod => mod.ManageTodoFeatureSection)
14+
);
15+
const GoalAdviceFeatureSection = dynamic(() =>
16+
import('@/composite/landing/goalAdvice').then(mod => mod.GoalAdviceFeatureSection)
17+
);
18+
const CollectPlanetFeatureSection = dynamic(() =>
19+
import('@/composite/landing/collectPlanet').then(mod => mod.CollectPlanetFeatureSection)
20+
);
21+
const FundingDiscountSection = dynamic(() =>
22+
import('@/composite/landing/fundingDiscount').then(mod => mod.FundingDiscountSection)
23+
);
24+
const LaunchSection = dynamic(() => import('@/composite/landing/launch').then(mod => mod.LaunchSection));
25+
const DonationSection = dynamic(() => import('@/composite/landing/DonationSection').then(mod => mod.default));
1426

1527
export default function LandingPage() {
1628
return (

src/composite/landing/DonationSection/DonationImage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const DonationImage = () => {
3939
sizes="(max-width: 768px) 200px, 350px"
4040
className="w-50 md:w-87.5 h-auto shrink-0"
4141
alt="donation-section-image"
42+
loading="lazy"
4243
/>
4344
<ToolTip text={renderToolTipText()} position="top-left" tailPosition="top-right" />
4445
</article>

src/composite/landing/addGoal/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export const AddGoalFeatureSection = () => {
3535
sizes="(max-width: 768px) 200px, 350px"
3636
className="w-50 md:w-87.5 h-auto shrink-0"
3737
alt="fifth-section-image"
38+
loading="lazy"
3839
/>
3940
</MotionWrapper>
4041
</div>

src/composite/landing/collectPlanet/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const CollectPlanetFeatureSection = () => {
3434
sizes="(max-width: 768px) 200px, 350px"
3535
className="w-50 md:w-87.5 h-auto shrink-0"
3636
alt="eighth-section-image"
37+
loading="lazy"
3738
/>
3839
</MotionWrapper>
3940
</div>

src/composite/landing/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const LandingPageCommonStyle = {
99
transition: { duration: 0.8, ease: 'easeOut' },
1010
},
1111
left: {
12-
initial: { opcity: 0, x: -40 },
12+
initial: { opacity: 0, x: -40 },
1313
whileInView: { opacity: 1, x: 0 },
1414
viewport: { once: true, amount: 0.3 },
1515
transition: { duration: 0.8, ease: 'easeOut' },

0 commit comments

Comments
 (0)