0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

fix(ui): native app postMessage listener should be registered properly (#3117)

This commit is contained in:
Charles Zhao 2023-02-20 14:59:53 +08:00 committed by GitHub
parent e7115d797c
commit bea8a8928e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -2,6 +2,7 @@ import type { ConnectorMetadata } from '@logto/schemas';
import classNames from 'classnames';
import SocialLinkButton from '@/components/Button/SocialLinkButton';
import useNativeMessageListener from '@/hooks/use-native-message-listener';
import useSocial from '@/hooks/use-social';
import { getLogoUrl } from '@/utils/logo';
@ -14,6 +15,7 @@ type Props = {
const SocialSignInList = ({ className, socialConnectors = [] }: Props) => {
const { invokeSocialSignIn, theme } = useSocial();
useNativeMessageListener();
return (
<div className={classNames(styles.socialLinkList, className)}>

View file

@ -1,5 +1,4 @@
import TermsOfUse from '@/containers/TermsOfUse';
import useNativeMessageListener from '@/hooks/use-native-message-listener';
import useSocial from '@/hooks/use-social';
import SocialSignInList from './SocialSignInList';
@ -11,7 +10,6 @@ type Props = {
const SocialSignIn = ({ className }: Props) => {
const { socialConnectors } = useSocial();
useNativeMessageListener();
return (
<>