-
Notifications
You must be signed in to change notification settings - Fork 3
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
결과페이지 첫 방문시에만 Tooltip 보이도록 수정 #458
Conversation
Bundle SizesCompared against 59b9fec Route: No significant changes found Dynamic import: No significant changes found |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #458 +/- ##
=======================================
Coverage 89.38% 89.38%
=======================================
Files 44 44
Lines 339 339
Branches 62 62
=======================================
Hits 303 303
Misses 36 36
☔ View full report in Codecov by Sentry. |
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.
쥬스쥬스 🧃 🧃 🧃 🧃 👍 👍 👍 👍
@@ -3,4 +3,5 @@ export const LOCAL_STORAGE_KEY = { | |||
reviewShortQuestionMessages: 'nlasq', | |||
surveyCustomQuestions: 'nlascq', | |||
surveyCreateSurveyRequest: 'nlascsr', | |||
resultRevisit: 'nlarv', |
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.
👍 👍 👍
src/pages/result/SurveyIdLoaded.tsx
Outdated
@@ -44,6 +47,8 @@ const PILL_COLORS: Color[] = ['bluegreen', 'pink', 'skyblue', 'yellowgreen', 'pu | |||
|
|||
const SurveyIdLoaded = ({ surveyId }: Props) => { | |||
const { fireToast } = useToast(); | |||
const [isRevisit, setIsRevisit] = useLocalStorage<boolean>(`${LOCAL_STORAGE_KEY.resultRevisit}`, false); |
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.
const [isRevisit, setIsRevisit] = useLocalStorage<boolean>(`${LOCAL_STORAGE_KEY.resultRevisit}`, false); | |
const [isRevisit, setIsRevisit] = useLocalStorage<boolean>(LOCAL_STORAGE_KEY.resultRevisit, false); |
상수가 문자열이라 이렇게 써도 되지 않을까욘?? 🤔
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.
오옹 이렇게 쓰면 어떤 변수가 들어와도 문자열임을 보장할 수 있어서 권장하는 방법인가요?! 궁금 @hyesungoh
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.
`${LOCAL_STORAGE_KEY.resultRevisit}`
산됴우님이 작성하신 방법은 말씀하신 것처럼 어떤 값이 들어와도 문자열임을 보장할 수 있는 방법인 거 같아용
근데 제가 말씀드린
LOCAL_STORAGE_KEY.resultRevisit
요건 저장된 값이 문자열이니, 그냥 사용해도 되지 않을까 ~~~ 하는 생각입니다 !
resultRevisit: 'nlarv', |
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.
c9b4833에서 수정 완~~~!
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.
👍 👍 👍 👍 7ㅏ즈아 🦈 🦈 🦈 🦈 🦈 🦈 🦈
🤔 해결하려는 문제가 무엇인가요?
매번 툴팁이 보여서 불편하다는 유저 피드백 반영
🎉 변경 사항
로컬스토리지에
isRevisit
을 추가하고 unmount 시점에 true로 변경해줍니다.true이면 툴팁을 렌더링하지 않습니다.
더 좋은 방법이 있다면 제보 바랍니다~~
🙏 여기는 꼭 봐주세요!
사용 방법
🌄 스크린샷
📚 참고