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

feat(hooks)!: automatically set isLoaded to false #199

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/displaying-ads-hook.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Return values of the hook are:

| Name | Type | Description |
| :------------- | :--------------------------------- | :----------------------------------------------------------------------------------------------------------------- |
| isLoaded | boolean | Whether the ad is loaded and ready to to be shown to the user. |
| isLoaded | boolean | Whether the ad is loaded and ready to to be shown to the user. Automatically set to false when the ad was shown. |
| isOpened | boolean | Whether the ad is opened. The value is remained `true` even after the ad is closed unless **new ad is requested**. |
| isClosed | boolean | Whether your ad is dismissed. |
| isShowing | boolean | Whether your ad is showing. The value is equal with `isOpened && !isClosed`. |
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useFullScreenAd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function useFullScreenAd<
setState({ isOpened: true });
break;
case AdEventType.CLOSED:
setState({ isClosed: true });
setState({ isClosed: true, isLoaded: false });
break;
case AdEventType.CLICKED:
setState({ isClicked: true });
Expand Down