-
Notifications
You must be signed in to change notification settings - Fork 5
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
내정보 페이지 채널톡 연동 #417
내정보 페이지 채널톡 연동 #417
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
역시 갓민희민희~
useEffect(() => { | ||
if (location.pathname.startsWith(PATHS.myInfo())) { | ||
ChannelService.showChannelButton(); | ||
} else { | ||
ChannelService.hideChannelButton(); | ||
} | ||
}, [location]); | ||
|
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.
앗 요거 설정해봤는데, 채널톡이 SPA 환경에서 URL 변경되는 걸 인지하지 못해서 아래와 같이 제대로 작동하지 않더라구요!
- /myinfo 경로로 최초 진입하면 채널톡 버튼이 뜨는데 홈으로 이동 시 사라지지 않음
- 반대로 홈 화면 경로로 최초 진입 후 내정보로 진입 시 버튼이 뜨지 않음
그래서 사이트 최초 진입 시에 채널톡 부트시키고, 경로 이동 시 버튼만 hide/show로 설정해두었습니다.
혹시 제가 놓친게 있다면 알려주세요! 😸
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.
앗 코드를 보니까 그러네요!
생각해보니 예전에 채널톡 화이트리스트를 적용했던 프로젝트는 Next로 구성된 프로젝트였던 기억이..
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.
네네 일단 요렇게 머지하께요!
@@ -256,5 +257,9 @@ const router = createBrowserRouter([ | |||
]); | |||
|
|||
export const Routers = () => { | |||
ChannelService.loadScript(); | |||
ChannelService.boot({ | |||
pluginKey: import.meta.env.VITE_CHANNELTALK_PLUGIN_KEY, |
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.
넵!
🏄🏼♂️ Summary (요약)
/myinfo
에 채널톡 버튼 추가🫨 Describe your Change (변경사항)
🧐 Issue number and link (참고)
📚 Reference (참조)