give-feedback-link.tsx 953 B

123456789101112131415161718192021222324252627282930313233
  1. import { useTranslation } from 'react-i18next'
  2. import OLButton from '@/shared/components/ol/ol-button'
  3. import getMeta from '@/utils/meta'
  4. import { useSplitTest } from '@/shared/context/split-test-context'
  5. export default function GiveFeedbackLink() {
  6. const { t } = useTranslation()
  7. const isProfessionalGroupPlan = getMeta('ol-user')?.isProfessionalGroupPlan
  8. const { info } = useSplitTest('sharing-updates')
  9. let link: string
  10. if (info?.phase === 'labs') {
  11. link =
  12. 'https://docs.google.com/forms/d/e/1FAIpQLSeOsPzSw8lWLY310ZvR7BCK08v3Puc4JWFdV6K3m9QbsL2OSw/viewform'
  13. } else if (isProfessionalGroupPlan) {
  14. link = 'https://forms.gle/rz1JDMuNajWG4ZY49'
  15. } else {
  16. link = 'https://forms.gle/WLEjzG4Ayp8zFscM9'
  17. }
  18. return (
  19. <OLButton
  20. variant="link"
  21. size="sm"
  22. href={link}
  23. target="_blank"
  24. rel="noopener noreferrer"
  25. className="fw-bold"
  26. >
  27. {t('give_feedback')}
  28. </OLButton>
  29. )
  30. }