mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-09 13:47:13 +02:00
fix: ts check
This commit is contained in:
parent
60d3df3282
commit
2afc1fb08e
@ -20,9 +20,9 @@ import type { IToast } from 'interfaces/toast';
|
|||||||
import { useTheme } from '@mui/material/styles';
|
import { useTheme } from '@mui/material/styles';
|
||||||
import type { FeedbackData, FeedbackMode } from './FeedbackContext';
|
import type { FeedbackData, FeedbackMode } from './FeedbackContext';
|
||||||
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
||||||
import { useUiFlag } from 'hooks/useUiFlag';
|
|
||||||
import useUserType from './useUserType';
|
import useUserType from './useUserType';
|
||||||
import { BaseModal } from 'component/common/SidebarModal/SidebarModal';
|
import { BaseModal } from 'component/common/SidebarModal/SidebarModal';
|
||||||
|
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||||
|
|
||||||
export const ParentContainer = styled('div')(({ theme }) => ({
|
export const ParentContainer = styled('div')(({ theme }) => ({
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
@ -205,12 +205,13 @@ export const FeedbackComponent = ({
|
|||||||
const userType = useUserType();
|
const userType = useUserType();
|
||||||
const { trackEvent } = usePlausibleTracker();
|
const { trackEvent } = usePlausibleTracker();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const { uiConfig } = useUiConfig();
|
||||||
|
|
||||||
const { addFeedback } = useUserFeedbackApi();
|
const { addFeedback } = useUserFeedbackApi();
|
||||||
const { setHasSubmittedFeedback } = useUserSubmittedFeedback(
|
const { setHasSubmittedFeedback } = useUserSubmittedFeedback(
|
||||||
feedbackData.category,
|
feedbackData.category,
|
||||||
);
|
);
|
||||||
const feedbackComments = useUiFlag('feedbackComments');
|
const feedbackComments = uiConfig?.flags?.feedbackComments;
|
||||||
|
|
||||||
function isProvideFeedbackSchema(data: any): data is ProvideFeedbackSchema {
|
function isProvideFeedbackSchema(data: any): data is ProvideFeedbackSchema {
|
||||||
data.difficultyScore = data.difficultyScore
|
data.difficultyScore = data.difficultyScore
|
||||||
@ -329,8 +330,7 @@ export const FeedbackComponent = ({
|
|||||||
</ScoreHelpContainer>
|
</ScoreHelpContainer>
|
||||||
</StyledScoreContainer>
|
</StyledScoreContainer>
|
||||||
|
|
||||||
{feedbackComments !== false &&
|
{feedbackComments?.enabled &&
|
||||||
feedbackComments.enabled &&
|
|
||||||
feedbackComments.name === 'withoutComments' ? (
|
feedbackComments.name === 'withoutComments' ? (
|
||||||
<>
|
<>
|
||||||
<Box>
|
<Box>
|
||||||
|
@ -310,17 +310,10 @@ const flags: IFlags = {
|
|||||||
process.env.UNLEASH_EXPERIMENTAL_DATA_USAGE_MULTI_MONTH_VIEW,
|
process.env.UNLEASH_EXPERIMENTAL_DATA_USAGE_MULTI_MONTH_VIEW,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
uiGlobalFontSize: {
|
uiGlobalFontSize: parseEnvVarBoolean(
|
||||||
name: 'uiGlobalFontSize',
|
process.env.EXPERIMENTAL_UI_GLOBAL_FONT_SIZE_NAME,
|
||||||
enabled: parseEnvVarBoolean(
|
false,
|
||||||
process.env.EXPERIMENTAL_UI_GLOBAL_FONT_SIZE_NAME,
|
),
|
||||||
false,
|
|
||||||
),
|
|
||||||
payload: {
|
|
||||||
type: PayloadType.JSON,
|
|
||||||
value: '14',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const defaultExperimentalOptions: IExperimentalOptions = {
|
export const defaultExperimentalOptions: IExperimentalOptions = {
|
||||||
|
Loading…
Reference in New Issue
Block a user