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

Update deprecated types #30

Closed
wants to merge 5 commits into from
Closed

Update deprecated types #30

wants to merge 5 commits into from

Conversation

designly1
Copy link

Changed deprecated "TurnstileOptions"to "RenderParameters". Removed "invisible" option from "size" option. May cause breaking changes.

Jay Simons added 5 commits April 19, 2023 16:45
Added a function export 'useTurnstile' that exposes the 'reset' method of the global turnstile object.
Return entire turnstile object rather than just the reset() method.
Changed deprecated "TurnstileOptions"to "RenderParameters". Removed "invisible" option from "size" option. May cause breaking changes.
Add "size" to props
Copy link
Owner

@Le0Developer Le0Developer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is unmergable due to being 36 commits behind

this is also spam to boost the author's portfolio:
image

Comment on lines +18 to +27
// Programmatic access example:
const turnstile = useTurnstile();

const result = await fetch('/path/to/some/api');
if (!result.ok) {
throw new Error(`Request failed with code ${result.status}`);
turnstile.reset();
}


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nonsensical addition, you are using a hook outside of a component.
The example on main also already covers this.

Comment on lines +46 to +49
export function useTurnstile() {
return global.turnstile;
}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function already exists with a proper component reload if you werent 36 commits behind.

Repository owner locked as spam and limited conversation to collaborators Aug 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants