|
@@ -6,7 +6,7 @@ import { postJSON } from '@/infrastructure/fetch-json'
|
|
|
import OLButton from '@/shared/components/ol/ol-button'
|
|
import OLButton from '@/shared/components/ol/ol-button'
|
|
|
import getMeta from '@/utils/meta'
|
|
import getMeta from '@/utils/meta'
|
|
|
|
|
|
|
|
-type IntegrationLinkingWidgetProps = {
|
|
|
|
|
|
|
+export type LabsExperimentWidgetProps = {
|
|
|
logo: ReactNode
|
|
logo: ReactNode
|
|
|
title: string
|
|
title: string
|
|
|
description: string | ReactNode
|
|
description: string | ReactNode
|
|
@@ -17,6 +17,7 @@ type IntegrationLinkingWidgetProps = {
|
|
|
setErrorMessage: (message: string) => void
|
|
setErrorMessage: (message: string) => void
|
|
|
optedIn: boolean
|
|
optedIn: boolean
|
|
|
setOptedIn: (optedIn: boolean) => void
|
|
setOptedIn: (optedIn: boolean) => void
|
|
|
|
|
+ feedbackLink?: string
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/** @knipignore */
|
|
/** @knipignore */
|
|
@@ -31,7 +32,8 @@ export function LabsExperimentWidget({
|
|
|
setErrorMessage,
|
|
setErrorMessage,
|
|
|
optedIn,
|
|
optedIn,
|
|
|
setOptedIn,
|
|
setOptedIn,
|
|
|
-}: IntegrationLinkingWidgetProps) {
|
|
|
|
|
|
|
+ feedbackLink,
|
|
|
|
|
+}: LabsExperimentWidgetProps) {
|
|
|
const { t } = useTranslation()
|
|
const { t } = useTranslation()
|
|
|
|
|
|
|
|
const experimentsErrorMessage = t(
|
|
const experimentsErrorMessage = t(
|
|
@@ -83,6 +85,18 @@ export function LabsExperimentWidget({
|
|
|
{disabled && (
|
|
{disabled && (
|
|
|
<div className="disabled-explanation">{t('experiment_full')}</div>
|
|
<div className="disabled-explanation">{t('experiment_full')}</div>
|
|
|
)}
|
|
)}
|
|
|
|
|
+ <div>
|
|
|
|
|
+ {optedIn && feedbackLink && (
|
|
|
|
|
+ <OLButton
|
|
|
|
|
+ variant="ghost"
|
|
|
|
|
+ href={feedbackLink}
|
|
|
|
|
+ target="_blank"
|
|
|
|
|
+ rel="noreferrer"
|
|
|
|
|
+ >
|
|
|
|
|
+ {t('give_feedback')}
|
|
|
|
|
+ </OLButton>
|
|
|
|
|
+ )}
|
|
|
|
|
+ </div>
|
|
|
<div>
|
|
<div>
|
|
|
{labsEnabled && (
|
|
{labsEnabled && (
|
|
|
<ActionButton
|
|
<ActionButton
|