// FE에서 구현한 페이지 코드 로직
import { useMutation } from "@apollo/client";
...
export const TossBrandPayAccessTokenApiRedirect: React.FC = () => {
const [apiFunc] = useMutation(apiMutation);
useEffect(() => {
const urlParams = new URLSearchParams(window.location.search);
const code = urlParams.get("code");
const customerKey = urlParams.get("customerKey");
apiFunc({ variables: { code, customerKey } });
}, []);
return <></>;
};
// FE에서 구현한 페이지 코드 로직
import { useMutation } from "@apollo/client";
...
export const TossBrandPayAccessTokenApiRedirect: React.FC = () => {
const [apiFunc] = useMutation(apiMutation);
useEffect(() => {
const urlParams = new URLSearchParams(window.location.search);
const code = urlParams.get("code");
const customerKey = urlParams.get("customerKey");
apiFunc({ variables: { code, customerKey } });
}, []);
return <></>;
};