Only show rating button when user is eligible to rate

Summary:
Behind a gk.

This uses a hidden webview to check if a user is eligible for star ratings. This means you can practively ask the user, and makes sure you'll get an unbiased distribution.

Reviewed By: danielbuechele

Differential Revision: D17343118

fbshipit-source-id: fe7471416aef947ec10f4734e4136868ab5ab3e5
This commit is contained in:
John Knox
2019-09-12 08:19:45 -07:00
committed by Facebook Github Bot
parent 7e0b66ae8e
commit 25739aebc2
2 changed files with 14 additions and 0 deletions

View File

@@ -5,6 +5,8 @@
* @format
*/
import {Component} from 'react';
export type FeedbackPrompt = {
preSubmitHeading: string;
postSubmitHeading: string;
@@ -28,3 +30,6 @@ export async function submitComment(
export async function getPrompt(): Promise<FeedbackPrompt> {
throw new Error('Method not implemented.');
}
export class StarRatingsEligibilityChecker extends Component<{
callback: (userIsEligible: boolean) => void;
}> {}