Skip to content

Commit 0d8f4bc

Browse files
committed
ref -> userRef
1 parent 867d0f0 commit 0d8f4bc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

HISTORY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Fixed
1515

1616
- `onTimeout` callback not properly registering
17+
- `ref` not passing properly - pass `userRef` instead
1718

1819
## [1.0.6] - 2022-11-25
1920

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ let ensureTurnstile: () => Promise<any>;
4545

4646
export default function Turnstile({
4747
id,
48-
ref: userRef,
4948
className,
5049
style,
5150
sitekey,
@@ -59,6 +58,7 @@ export default function Turnstile({
5958
retry,
6059
retryInterval,
6160
autoResetOnExpire,
61+
userRef,
6262
onVerify,
6363
onLoad,
6464
onError,
@@ -150,7 +150,7 @@ interface TurnstileProps extends TurnstileCallbacks {
150150
autoResetOnExpire?: boolean;
151151

152152
id?: string;
153-
ref?: React.MutableRefObject<HTMLDivElement>;
153+
userRef?: React.MutableRefObject<HTMLDivElement>;
154154
className?: string;
155155
style?: React.CSSProperties;
156156
}

0 commit comments

Comments
 (0)