Skip to content

Conversation

@waqaramjad
Copy link

Description

This PR introduces a new prop, shouldAllowNavigation, to the GameballWidget component. This prop allows developers to handle WebView navigation requests and decide whether to allow or block them based on custom logic. Additionally, it enables performing specific actions, such as redirecting users to a login screen or stopping navigation if certain conditions (e.g., user registration) are not met.

Changes

  1. Added shouldAllowNavigation prop to the GameballWidget component.
  2. Updated the Props interface to include the new prop.
  3. Modified the WebView implementation to use shouldAllowNavigation.
  4. Updated the README to document the new prop with examples.

Purpose

The shouldAllowNavigation prop enables developers to:

  • Restrict navigation to specific domains.
  • Perform custom actions based on navigation events (e.g., redirecting to login if the user is not registered).
  • Block navigation under certain conditions.

Request to Maintainers

Please add documentation for the shouldAllowNavigation prop to your official website or documentation portal. This will help developers understand its usage and integrate it effectively into their applications.

Testing

  • Verified that the shouldAllowNavigation prop works as intended by passing a callback function and observing WebView behavior.

Checklist

  • Code changes
  • Documentation request
  • Tests (if applicable)

Related Issues

None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant