-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor(#249): 링크 공유 개선, Toast state 분리 #250
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
Refactor(#249): 링크 공유 개선, Toast state 분리 #250
Conversation
- 클립보드 공유의 method를 따로 분리하고, env에서 url을 가져오도록 수정하였습니다.
- toast state 관련 파일을 src/stores로 이동하였습니다.
✅ Deploy Preview for boarlog ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다! 마스터 클래스 끝나자 마자 올라왔군요 ㅎㅎ
@@ -1,6 +1,6 @@ | |||
import { useState, useEffect } from "react"; | |||
import { useRecoilState } from "recoil"; | |||
import { toastListState } from "./toastAtom"; | |||
import { toastListState } from "../../stores/stateToastList"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { toastListState } from "../../stores/stateToastList"; | |
import { toastListState } from "@/stores/stateToastList"; |
위의 주소처럼 통일하는 것은 어떤가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정하는게 좋겠네요! 감사합니다 :)
await navigator.clipboard.writeText( | ||
`[함께 듣는 실시간 강의 Boarlog]\n\n지금 진행되는 강의에 참여해 보세요.\n\n강의 코드: ${lectureCode}\n강의 제목: 화이트보드 테스트\n강의 링크: https://dev--boarlog.netlify.app/participant?roomid=${lectureCode}` | ||
); | ||
await navigator.clipboard.writeText(getClipboardText(lectureCode)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
함수 분리 좋습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!
- ToastContainer의 상대 경로를 수정하였습니다.
작업 개요
작업 사항
고민한 점들(필수 X)
현재 프로젝트는
dev
와main
으로local/dev/production
로 페이즈를 나누어 개발중에 있습니다. 강의 코드를 클립보드에 복사하여 링크를 공유하는 과정에서base-url
이 달라야 하기 때문에 이를 위해env
로 값을 달리하여 각 페이즈마다의 공유 링크를 가지도록 하였습니다.추가적으로 state를 한 곳에 모아 관리하기 위해
Toast
의 recoil state 관련 파일을src/stores
로 이동하여 구조 개선 작업을 시작하였습니다. (naming convention에 맞게 이름을 변경하였습니다.)스크린샷(필수 X)
(뷰 변경사항 없음)