ChemPal Documentation - v1.7.0
    Preparing search index...
    • Invites an engaged user to leave a Chrome Web Store review.

      Reuses the shared PromptSnackbar — the same bottom-center notice as the update prompts — summarizing how long they've had the extension and how much they've used it, with an action that opens the store's reviews page.

      Parameters

      Returns null | Element

      The rendered review prompt, or nothing when there's no milestone to show.

      const { notice, onReview, onDismiss } = useReviewPrompt();
      <ReviewPrompt notice={notice} onReview={onReview} onDismiss={onDismiss} />
      export function ReviewPrompt({ notice, onReview, onDismiss }: ReviewPromptProps) {
      if (!notice) return null;

      return (
      <PromptSnackbar
      testId="review-snackbar"
      actionTestId="review-snackbar-action"
      dismissTestId="review-snackbar-dismiss"
      open
      message={i18n('review_prompt_message', [
      String(notice.days),
      String(notice.searches),
      String(notice.products),
      ])}
      actionLabel={i18n('review_prompt_action')}
      onAction={onReview}
      onDismiss={onDismiss}
      dismissLabel={i18n('update_dismiss')}
      />
      );
      }