Skip to content

Commit 97fe32c

Browse files
committed
fix: 오타, 애니메이션 트리거 수정
1 parent e407179 commit 97fe32c

3 files changed

Lines changed: 6 additions & 14 deletions

File tree

animations/landingGSAP.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface AnimateOptions {
1111
yOffset?: number; // y축 이동 거리
1212
}
1313

14-
/* Fad Up 함수 */
14+
/* Fade Up 함수 */
1515
const animateFadeUp = ({
1616
trigger,
1717
targets,
@@ -88,7 +88,6 @@ export const initFeatureListAnimation = ({
8888

8989
/* --- 3. Landing Preview Section --- */
9090
export type LandingPreviewRefs = {
91-
rootEl: HTMLElement;
9291
titleEl: HTMLHeadingElement;
9392
contentContainerEl: HTMLDivElement;
9493
};
@@ -97,7 +96,7 @@ export const initLandingPreviewAnimation = ({
9796
titleEl,
9897
contentContainerEl,
9998
}: LandingPreviewRefs) => {
100-
const items = contentContainerEl.querySelectorAll('#fc-item');
99+
const items = contentContainerEl.querySelectorAll('.fc-item');
101100

102101
return animateFadeUp({
103102
trigger: titleEl,

components/landing/FeatureContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const FeatureContent = () => {
2323
return (
2424
<ul className="space-y-6">
2525
{ITEMS.map((item) => (
26-
<li key={item.title} id="fc-item">
26+
<li key={item.title} className="fc-item">
2727
<div className="flex gap-3">
2828
<FiCheckCircle className="text-primary text-2xl" />
2929
<p className="text-xl font-medium">{item.title}</p>

components/landing/LandingPreview.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,19 @@ import { useLayoutEffect, useRef } from 'react';
66
import { initLandingPreviewAnimation } from '@/animations/landingGSAP';
77

88
const LandingPreview = () => {
9-
const rootRef = useRef<HTMLDivElement>(null);
109
const titleRef = useRef<HTMLHeadingElement>(null);
1110
const contentRef = useRef<HTMLDivElement>(null);
1211

1312
useLayoutEffect(() => {
14-
if (!rootRef.current || !titleRef.current || !contentRef.current) return;
13+
if (!titleRef.current || !contentRef.current) return;
1514

1615
return initLandingPreviewAnimation({
17-
rootEl: rootRef.current,
1816
titleEl: titleRef.current,
1917
contentContainerEl: contentRef.current,
2018
});
2119
}, []);
2220
return (
23-
<div
24-
ref={rootRef}
25-
className="mt-30 flex h-full flex-col items-center justify-center space-y-3 pt-50 pb-50 text-center"
26-
>
21+
<div className="mt-30 flex h-full flex-col items-center justify-center space-y-3 pt-50 pb-50 text-center">
2722
<h1 ref={titleRef} className="text-4xl font-bold">
2823
체계적인 학습으로
2924
</h1>
@@ -32,19 +27,17 @@ const LandingPreview = () => {
3227
className="mx-20 mt-10 grid max-w-7xl grid-cols-1 items-start gap-10 lg:grid-cols-2 lg:gap-2"
3328
ref={contentRef}
3429
>
35-
3630
<div className="flex min-w-[355px] justify-center">
3731
<FeatureContent />
3832
</div>
3933

4034
<div className="flex justify-center">
4135
<Image
42-
id="fc-item"
4336
src="/PreviewImage.png"
4437
alt="DevFlow 미리보기"
4538
width={720}
4639
height={400}
47-
className="w-full max-w-[480px] min-w-[360px] object-contain md:max-w-[560px] lg:max-w-[640px] xl:max-w-[720px]"
40+
className="fc-item w-full max-w-[480px] min-w-[360px] object-contain md:max-w-[560px] lg:max-w-[640px] xl:max-w-[720px]"
4841
/>
4942
</div>
5043
</div>

0 commit comments

Comments
 (0)