Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/result loading #2

Merged
merged 5 commits into from
Aug 28, 2024
Merged

Feature/result loading #2

merged 5 commits into from
Aug 28, 2024

Conversation

parknew0
Copy link
Collaborator

@parknew0 parknew0 commented Aug 28, 2024

구현한 기능

  • 결과창 로딩화면

논의하고 싶은 내용

  • 선택사항을 전역으로 받아온 뒤 선택사항과 관련된 이모지를 보여주고 싶기 때문에 질문지 개발하시는 분이 정보를 잘 넘겨주면 좋겠음
    (서로 그 방법에 대한 논의가 필요할 것 같음)
  • 로딩화면을 강제로 3초 정도 보여줄건데 그 사이에 뭔가 유용한 작업을 할 수 있는가? (레이지 로딩?)

기타

  • TypingAnimation.tsx는 npm install hangul-js 로 라이브러리 추가해야 쓸 수 있음
  • 개선사항 모두 시정완료

Comment on lines 9 to 15
useEffect(() => {
const emojiInterval = setInterval(() => {
setCurrentEmojiIndex((prevIndex) => (prevIndex + 1) % emojis.length);
}, 1000); // 1초마다 이모지를 변경

return () => clearInterval(emojiInterval);
}, []);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useEffect(function changeEmojiByInterval() {
    const emojiInterval = setInterval(() => {
          setCurrentEmojiIndex((prevIndex) => (prevIndex + 1) % emojis.length);
    }, 1000); 
    return () => clearInterval(emojiInterval);
}, [])

useEffect 사용시에 콜백함수에 익명함수가 아닌 특정 effect 를 실행한다는 것을 작명한 함수를 사용하면 코드가 더 깔끔할 것 같아요!

Comment on lines 24 to 26
let index = 0;
let isDeleting = false;
let typeTimeout: NodeJS.Timeout;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useRef 로 변경하면 좋을것 같습니다!

Comment on lines 18 to 20
const [displayedText, setDisplayedText] = useState("");
const [currentTextIndex, setCurrentTextIndex] = useState(0);
const [isCursorBlinking, setIsCursorBlinking] = useState(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제네릭으로 타입 지정해주세요!

Copy link
Member

@toothlessdev toothlessdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!! 😊

@toothlessdev toothlessdev merged commit 850638b into develop Aug 28, 2024
2 checks passed
@toothlessdev toothlessdev deleted the feature/result-loading branch August 28, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants