Skip to content

Commit 36838a1

Browse files
abereghiciAlexandru Bereghici
andauthored
fix: typo in MomentListener type (#197)
* fix: typo in MomentListener type * chore: added patch update --------- Co-authored-by: Alexandru Bereghici <abereghici@tripadvisor.com>
1 parent a359eb5 commit 36838a1

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

.changeset/old-years-try.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@react-oauth/google': patch
3+
---
4+
5+
Fixed typo in MomentListener type

packages/@react-oauth/google/src/GoogleLogin.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
IdConfiguration,
77
CredentialResponse,
88
GoogleCredentialResponse,
9-
MomenListener,
9+
MomentListener,
1010
GsiButtonConfiguration,
1111
} from './types';
1212

@@ -15,7 +15,7 @@ const containerHeightMap = { large: 40, medium: 32, small: 20 };
1515
export type GoogleLoginProps = {
1616
onSuccess: (credentialResponse: CredentialResponse) => void;
1717
onError?: () => void;
18-
promptMomentNotification?: MomenListener;
18+
promptMomentNotification?: MomentListener;
1919
useOneTap?: boolean;
2020
} & Omit<IdConfiguration, 'client_id' | 'callback'> &
2121
GsiButtonConfiguration;

packages/@react-oauth/google/src/google-auth-window.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ interface Window {
33
accounts: {
44
id: {
55
initialize: (input: IdConfiguration) => void;
6-
prompt: (momentListener?: MomenListener) => void;
6+
prompt: (momentListener?: MomentListener) => void;
77
renderButton: (
88
parent: HTMLElement,
99
options: GsiButtonConfiguration,

packages/@react-oauth/google/src/hooks/useGoogleOneTapLogin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import { extractClientId } from '../utils';
55
import {
66
CredentialResponse,
77
GoogleCredentialResponse,
8-
MomenListener,
8+
MomentListener,
99
} from '../types';
1010

1111
interface UseGoogleOneTapLoginOptions {
1212
onSuccess: (credentialResponse: CredentialResponse) => void;
1313
onError?: () => void;
14-
promptMomentNotification?: MomenListener;
14+
promptMomentNotification?: MomentListener;
1515
cancel_on_tap_outside?: boolean;
1616
hosted_domain?: string;
1717
}

packages/@react-oauth/google/src/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,6 @@ export interface CodeClientConfig {
332332
select_account?: boolean;
333333
}
334334

335-
export type MomenListener = (
335+
export type MomentListener = (
336336
promptMomentNotification: PromptMomentNotification,
337337
) => void;

0 commit comments

Comments
 (0)