(null);
+
+ useEffect(()=>{
+ if(SlideRef.current){
+ const slideRange=SlideRef.current.offsetWidth*currentInfo;
+ SlideRef.current.style.transition = "all 0.5s ease-in-out";
+ SlideRef.current.style.transform=`translateX(-${slideRange}px)`
+ }
+ },[currentInfo])
+
const onClickPrevButton=()=>{
- if (currentInfo===1){
- setCurrentInfo(5);
+ if (currentInfo===0){
+ setCurrentInfo(4);
}
else{
setCurrentInfo((cur)=>cur-1);
@@ -123,8 +100,8 @@ export function About(prop:AboutProps){
}
const onClickNextButton=()=>{
- if (currentInfo===5){
- setCurrentInfo(1);
+ if (currentInfo===4){
+ setCurrentInfo(0);
}
else{
setCurrentInfo((cur)=>cur+1);
@@ -132,27 +109,25 @@ export function About(prop:AboutProps){
}
return(
-
- 성취하며 느낀 행복을 오랫동안 기억하고,
-
- 차근차근 꾸준하게 성장 중인
-
- 프론트엔드 개발자 이현지입니다.
-
-
-
+
+
+ {RenderContact()}
+ {RenderEducation()}
+ {RenderCareer()}
+ {RenderPrize()}
+ {RenderEtc()}
+
-
+
+
+
+
);
diff --git a/src/pages/Board.tsx b/src/pages/Board.tsx
index 8cfe684..3ccbab0 100644
--- a/src/pages/Board.tsx
+++ b/src/pages/Board.tsx
@@ -1,9 +1,10 @@
-import { useState } from "react";
-import ConfettiExplosion, { ConfettiProps } from "react-confetti-explosion";
+
import { styled } from "styled-components";
import { BoardList } from "../components/Board/BoardList";
import { InputMessage } from "../components/Board/InputMessage";
import Snowfall from "react-snowfall";
+import { useInView } from "react-intersection-observer";
+import { useEffect, useState } from "react";
const Div = styled.div`
@@ -17,21 +18,39 @@ const Div = styled.div`
justify-content:center;
background-image:linear-gradient(0deg, #ffffff 0%,#7FB4E280 100%);
`
+const BoardWrapper=styled.div`
+ width:100%;
+ height:100%;
+ z-index:2;
+ padding: 5% 5%;
+ background-color:white;
+ border-radius:10px;
+`
type BoardProps={
boardRef:React.ForwardedRef;
}
export function Board(prop:BoardProps){
- const [onConfeti,setOnConfetti]=useState(true);
+ const {ref, inView}=useInView();
+ const [onSnow, setOnSnow]=useState(false);
+ useEffect(()=>{
+ if (inView){
+ setOnSnow(true)
+ }
+ else {
+ setOnSnow(false)
+ }
+ },[inView])
+
return(
-
- {/* {onConfeti &&
- setOnConfetti(false)}
- colors={['#7FB4E2','#6F3A00','#FFECCC','#8B7356','#87ceeb']}/>} */}
-
-
+ {/* 뷰 안에 요소가 들어오면 animation 실행 */}
+
+ {onSnow?:null}
+
+
+
+
);
}
\ No newline at end of file