Skip to content

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

Conversation

LellowMellow
Copy link
Collaborator

작업 개요

작업 사항

  • 클립보드 공유 텍스트 method로 분리
  • 공유 base url 링크 env 추가
  • toast recoil state 분리

고민한 점들(필수 X)

현재 프로젝트는 devmain으로 local/dev/production로 페이즈를 나누어 개발중에 있습니다. 강의 코드를 클립보드에 복사하여 링크를 공유하는 과정에서 base-url이 달라야 하기 때문에 이를 위해 env로 값을 달리하여 각 페이즈마다의 공유 링크를 가지도록 하였습니다.

추가적으로 state를 한 곳에 모아 관리하기 위해 Toast의 recoil state 관련 파일을 src/stores로 이동하여 구조 개선 작업을 시작하였습니다. (naming convention에 맞게 이름을 변경하였습니다.)

스크린샷(필수 X)

(뷰 변경사항 없음)

- 클립보드 공유의 method를 따로 분리하고, env에서 url을 가져오도록
  수정하였습니다.
- toast state 관련 파일을 src/stores로 이동하였습니다.
@LellowMellow LellowMellow added 🛠️ Refactor 리팩토링 작업 FE 프론트엔드 작업 labels Dec 11, 2023
@LellowMellow LellowMellow added this to the 6주차 milestone Dec 11, 2023
@LellowMellow LellowMellow self-assigned this Dec 11, 2023
Copy link

netlify bot commented Dec 11, 2023

Deploy Preview for boarlog ready!

Name Link
🔨 Latest commit ffbbd2c
🔍 Latest deploy log https://app.netlify.com/sites/boarlog/deploys/6576af876527b40008340f4c
😎 Deploy Preview https://deploy-preview-250--boarlog.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@Jw705 Jw705 left a 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";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
import { toastListState } from "../../stores/stateToastList";
import { toastListState } from "@/stores/stateToastList";

위의 주소처럼 통일하는 것은 어떤가요?

Copy link
Collaborator Author

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));
Copy link
Collaborator

Choose a reason for hiding this comment

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

함수 분리 좋습니다!

Copy link
Collaborator

@Byeonjin Byeonjin left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!

- ToastContainer의 상대 경로를 수정하였습니다.
@LellowMellow LellowMellow merged commit f888d2d into boostcampwm2023:dev Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FE 프론트엔드 작업 🛠️ Refactor 리팩토링 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor: 링크 공유 개선, Toast state 분리
3 participants