Skip to content

Commit cbf1620

Browse files
committed
scroll down dissapear issue revised
1 parent 675f9f1 commit cbf1620

File tree

2 files changed

+29
-20
lines changed

2 files changed

+29
-20
lines changed

src/components/atoms/Scrolldown.tsx

+21-10
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,28 @@ import { motion } from "framer-motion"
44
const Scrolldown = () => {
55
return (
66
<motion.div
7-
initial={{ opacity: 0, y: 100 }}
8-
animate={{ opacity: 1, y: 0 }}
9-
transition={{ duration: 2.5, delay: 2 }} className="flex flex-col absolute bottom-7 justify-end items-center">
10-
<h5 className='font-sans font-gray-500 font-light text-gray-700'>
11-
스크롤을 내려주세요
12-
</h5>
13-
14-
<div className="flex flex-col items-center">
15-
<ChevronsDown strokeWidth={1.5}/>
16-
</div>
7+
initial={{ opacity: 0, y: 100 }}
8+
animate={{ opacity: 1, y: 0 }}
9+
transition={{ duration: 2.5, delay: 2 }}
10+
className="flex flex-col justify-center items-center z-10"
11+
>
12+
<h5 className='font-sans font-gray-500 font-light text-gray-700 mb-2'>
13+
스크롤을 내려주세요
14+
</h5>
15+
16+
<motion.div
17+
animate={{
18+
y: [0, 10, 0]
19+
}}
20+
transition={{
21+
duration: 1.5,
22+
repeat: Infinity,
23+
ease: "easeInOut"
24+
}}
25+
>
26+
<ChevronsDown strokeWidth={1.5} />
1727
</motion.div>
28+
</motion.div>
1829
)
1930
}
2031

src/components/pages/PortfolioMain.tsx

+8-10
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const PortfolioMain = () => {
1717

1818
const [isScrolled, setIsScrolled] = useState(false);
1919

20-
// Create refs for each section
2120
const introRef = useRef<HTMLDivElement>(null);
2221
const helloRef = useRef<HTMLDivElement>(null);
2322
const projectRef = useRef<HTMLDivElement>(null);
@@ -31,7 +30,6 @@ const PortfolioMain = () => {
3130
return () => window.removeEventListener('scroll', updateScroll);
3231
}, []);
3332

34-
3533
const handleScroll = (ref: MutableRefObject<HTMLDivElement | null>) => {
3634
ref.current?.scrollIntoView({ behavior: 'smooth' });
3735
};
@@ -65,24 +63,24 @@ const PortfolioMain = () => {
6563
/>
6664
</motion.div>
6765

68-
<main className="relative w-full min-h-screen">
69-
<div ref={introRef} className="w-full flex justify-center">
66+
<main className="relative w-full">
67+
<div ref={introRef} className="w-full flex justify-center min-h-screen relative">
7068
<IntroSection />
71-
</div>
7269

73-
<div className='absolute bottom-0 w-full flex justify-center'>
74-
<Scrolldown />
70+
<div className='absolute bottom-5 w-full flex justify-center'>
71+
<Scrolldown />
72+
</div>
7573
</div>
7674

77-
<div ref={helloRef} className="w-full flex justify-center">
75+
<div ref={helloRef} className="w-full flex justify-center min-h-screen">
7876
<HelloSection />
7977
</div>
8078

81-
<div ref={projectRef} className="w-full flex justify-center">
79+
<div ref={projectRef} className="w-full flex justify-center min-h-screen">
8280
<ProjectSection />
8381
</div>
8482

85-
<div ref={contactRef} className="w-full flex justify-center">
83+
<div ref={contactRef} className="w-full flex justify-center min-h-[100px]">
8684
<ContactSection />
8785
</div>
8886
</main>

0 commit comments

Comments
 (0)