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

한화면에서 2개의 동일한 버튼 선택시 발생하는 버그 #13

Open
ehdrms2034 opened this issue Jul 29, 2020 · 2 comments
Open

Comments

@ehdrms2034
Copy link

ehdrms2034 commented Jul 29, 2020

한 화면에서 2개의 react-naver-login 을 사용하는 경우,
onSuccess 에 정의되어있는 이벤트가 다르다고 하더라도, 먼저 불러진 클래스의 이벤트로만 실행이 됩니다.

import NaverLogin from "react-naver-login";
import NaverSignUp from "react-naver-login";
...
...
            <NaverSignUp
              clientId="clientID"
              callbackUrl="http://localhost:3000"
              onSuccess={(result) => {
                signUpByNaver(result.id,result.email,result.name,"naver");
              }}
              onFailure={() => {
                alert("하이");
                console.error();
              }}
              render={(props) => (
                <NaverBtn onClick={props.onClick}>
                  네이버 아이디로 회원가입
                </NaverBtn>
              )}
            />

          <NaverLogin
              clientId="clientID"
              callbackUrl="http://localhost:3000"
              onSuccess={(result) => {
                console.log(result);
              }}
              onFailure={() => {
                console.error();
              }}
              render={(props) => (
                <NaverBtn onClick={props.onClick}>
                  네이버 아이디로 로그인
                </NaverBtn>
              )}
            />

라고 한다면, 위의 NaverSignUp의 onSuccess만 호출됩니다.

@hyeribo
Copy link

hyeribo commented Oct 8, 2020

저도 같은 문제가 발생하는데, 해결하셨나요?

@ehdrms2034
Copy link
Author

ehdrms2034 commented Oct 8, 2020

@hyeribo 아뇨 네이버 map API를 써서 자체적으로 해결했던 것 같습니다 :)

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

No branches or pull requests

2 participants