You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hooks.web.ts 551B

1234567891011121314151617181920212223
  1. import { useSelector } from 'react-redux';
  2. import FeedbackButtonWeb from './components/FeedbackButton.web';
  3. import { shouldSendJaaSFeedbackMetadata } from './functions.web';
  4. const feedback = {
  5. key: 'feedback',
  6. Content: FeedbackButtonWeb,
  7. group: 4
  8. };
  9. /**
  10. * A hook that returns the feedback button if it is enabled and undefined otherwise.
  11. *
  12. * @returns {Object | undefined}
  13. */
  14. export function useFeedbackButton() {
  15. const visible = useSelector(shouldSendJaaSFeedbackMetadata);
  16. if (visible) {
  17. return feedback;
  18. }
  19. }