mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-05 17:53:12 +02:00
[Gitar] Updating TSX files
This commit is contained in:
parent
1875c9b6d1
commit
1b444c6495
@ -34,7 +34,6 @@ import { FeatureToggleFilters } from './FeatureToggleFilters/FeatureToggleFilter
|
|||||||
import { withTableState } from 'utils/withTableState';
|
import { withTableState } from 'utils/withTableState';
|
||||||
import { FeatureTagCell } from 'component/common/Table/cells/FeatureTagCell/FeatureTagCell';
|
import { FeatureTagCell } from 'component/common/Table/cells/FeatureTagCell/FeatureTagCell';
|
||||||
import { FeatureSegmentCell } from 'component/common/Table/cells/FeatureSegmentCell/FeatureSegmentCell';
|
import { FeatureSegmentCell } from 'component/common/Table/cells/FeatureSegmentCell/FeatureSegmentCell';
|
||||||
import { useUiFlag } from 'hooks/useUiFlag';
|
|
||||||
import { FeatureToggleListActions } from './FeatureToggleListActions/FeatureToggleListActions';
|
import { FeatureToggleListActions } from './FeatureToggleListActions/FeatureToggleListActions';
|
||||||
import useLoading from 'hooks/useLoading';
|
import useLoading from 'hooks/useLoading';
|
||||||
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
||||||
@ -55,7 +54,7 @@ const feedbackCategory = 'search';
|
|||||||
|
|
||||||
export const FeatureToggleListTable: VFC = () => {
|
export const FeatureToggleListTable: VFC = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const featureSearchFeedback = useUiFlag('featureSearchFeedback');
|
const featureSearchFeedback = true;
|
||||||
const { trackEvent } = usePlausibleTracker();
|
const { trackEvent } = usePlausibleTracker();
|
||||||
const { environments } = useEnvironments();
|
const { environments } = useEnvironments();
|
||||||
const enabledEnvironments = environments
|
const enabledEnvironments = environments
|
||||||
@ -68,10 +67,7 @@ export const FeatureToggleListTable: VFC = () => {
|
|||||||
const { setToastApiError } = useToast();
|
const { setToastApiError } = useToast();
|
||||||
const { uiConfig } = useUiConfig();
|
const { uiConfig } = useUiConfig();
|
||||||
|
|
||||||
const variant =
|
const variant = featureSearchFeedback?.name ?? '';
|
||||||
featureSearchFeedback !== false
|
|
||||||
? featureSearchFeedback?.name ?? ''
|
|
||||||
: '';
|
|
||||||
|
|
||||||
const { openFeedback } = useFeedback(
|
const { openFeedback } = useFeedback(
|
||||||
feedbackCategory,
|
feedbackCategory,
|
||||||
@ -322,64 +318,53 @@ export const FeatureToggleListTable: VFC = () => {
|
|||||||
<FeatureToggleListActions
|
<FeatureToggleListActions
|
||||||
onExportClick={() => setShowExportDialog(true)}
|
onExportClick={() => setShowExportDialog(true)}
|
||||||
/>
|
/>
|
||||||
{featureSearchFeedback !== false &&
|
{featureSearchFeedback?.enabled && (
|
||||||
featureSearchFeedback?.enabled && (
|
<>
|
||||||
<>
|
<ConditionallyRender
|
||||||
<ConditionallyRender
|
condition={variant === 'withoutText'}
|
||||||
condition={
|
show={
|
||||||
variant === 'withoutText'
|
<Tooltip
|
||||||
}
|
title='Provide feedback'
|
||||||
show={
|
arrow
|
||||||
<Tooltip
|
>
|
||||||
title='Provide feedback'
|
<IconButton
|
||||||
arrow
|
|
||||||
>
|
|
||||||
<IconButton
|
|
||||||
onClick={
|
|
||||||
createFeedbackContext
|
|
||||||
}
|
|
||||||
size='large'
|
|
||||||
>
|
|
||||||
<ReviewsOutlined />
|
|
||||||
</IconButton>
|
|
||||||
</Tooltip>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<ConditionallyRender
|
|
||||||
condition={variant === 'withText'}
|
|
||||||
show={
|
|
||||||
<Button
|
|
||||||
startIcon={
|
|
||||||
<ReviewsOutlined />
|
|
||||||
}
|
|
||||||
onClick={
|
onClick={
|
||||||
createFeedbackContext
|
createFeedbackContext
|
||||||
}
|
}
|
||||||
|
size='large'
|
||||||
>
|
>
|
||||||
Provide feedback
|
<ReviewsOutlined />
|
||||||
</Button>
|
</IconButton>
|
||||||
}
|
</Tooltip>
|
||||||
/>{' '}
|
}
|
||||||
<ConditionallyRender
|
/>
|
||||||
condition={
|
<ConditionallyRender
|
||||||
variant === 'withTextOutlined'
|
condition={variant === 'withText'}
|
||||||
}
|
show={
|
||||||
show={
|
<Button
|
||||||
<Button
|
startIcon={<ReviewsOutlined />}
|
||||||
startIcon={
|
onClick={createFeedbackContext}
|
||||||
<ReviewsOutlined />
|
>
|
||||||
}
|
Provide feedback
|
||||||
onClick={
|
</Button>
|
||||||
createFeedbackContext
|
}
|
||||||
}
|
/>{' '}
|
||||||
variant='outlined'
|
<ConditionallyRender
|
||||||
>
|
condition={
|
||||||
Provide feedback
|
variant === 'withTextOutlined'
|
||||||
</Button>
|
}
|
||||||
}
|
show={
|
||||||
/>
|
<Button
|
||||||
</>
|
startIcon={<ReviewsOutlined />}
|
||||||
)}
|
onClick={createFeedbackContext}
|
||||||
|
variant='outlined'
|
||||||
|
>
|
||||||
|
Provide feedback
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user