From 2895516ddaa3ed1914752c82d1faedb694a72d55 Mon Sep 17 00:00:00 2001 From: andreas-unleash <104830839+andreas-unleash@users.noreply.github.com> Date: Fri, 29 Jul 2022 12:05:40 +0300 Subject: [PATCH] fmt --- .../ConstraintAccordionViewHeaderInfo.tsx | 3 +-- .../FeatureResultInfoPopoverCell.tsx | 14 ++++++-------- .../PlaygroundResultConstraintExecution.tsx | 6 +++++- .../PlaygroundResultFeatureDetails.styles.ts | 5 ++--- .../PlaygroundResultFeatureDetails.tsx | 15 +++++++++------ .../api/actions/usePlayground/playground.model.ts | 1 - 6 files changed, 23 insertions(+), 21 deletions(-) diff --git a/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionViewHeader/ConstraintAccordionViewHeaderInfo/ConstraintAccordionViewHeaderInfo.tsx b/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionViewHeader/ConstraintAccordionViewHeaderInfo/ConstraintAccordionViewHeaderInfo.tsx index a300f37cb6..845c876e0d 100644 --- a/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionViewHeader/ConstraintAccordionViewHeaderInfo/ConstraintAccordionViewHeaderInfo.tsx +++ b/frontend/src/component/common/ConstraintAccordion/ConstraintAccordionView/ConstraintAccordionViewHeader/ConstraintAccordionViewHeaderInfo/ConstraintAccordionViewHeaderInfo.tsx @@ -78,8 +78,7 @@ export const ConstraintAccordionViewHeaderInfo = ({ constraint.contextName ] ) - ? theme.palette.neutral - .dark + ? theme.palette.neutral.dark : theme.palette.error.main } > diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/FeatureResultInfoPopoverCell.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/FeatureResultInfoPopoverCell.tsx index cb239ef8ee..f937b2cf06 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/FeatureResultInfoPopoverCell.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/FeatureResultInfoPopoverCell.tsx @@ -34,14 +34,12 @@ export const FeatureResultInfoPopoverCell = ({ name: feature?.name as any, projectId: 'default', isEnabled: true, - } as any; const dummyPlaygroundFeatureFalse: PlaygroundFeatureSchema = { name: feature?.name as any, projectId: 'default', isEnabled: false, - } as any; const strategies: PlaygroundFeatureStrategyResult[] = [ @@ -57,11 +55,7 @@ export const FeatureResultInfoPopoverCell = ({ operator: 'IN', caseInsensitive: false, inverted: false, - values: [ - 'MyApp', - 'MyOtherApp', - 'Unleash', - ], + values: ['MyApp', 'MyOtherApp', 'Unleash'], }, ], segments: [ @@ -108,7 +102,11 @@ export const FeatureResultInfoPopoverCell = ({ classes={{ paper: styles.popoverPaper }} > setOpen(false)} /> ({ padding: '4px', }, icon: { - textAlign: 'right' - - } + textAlign: 'right', + }, })); diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.tsx index a5283d6173..52179a27f6 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/FeatureResultInfoPopoverCell/PlaygroundResultFeatureDetails/PlaygroundResultFeatureDetails.tsx @@ -1,12 +1,12 @@ import { PlaygroundFeatureSchema } from '../../../../../../hooks/api/actions/usePlayground/playground.model'; -import {IconButton, Typography, useTheme} from '@mui/material'; +import { IconButton, Typography, useTheme } from '@mui/material'; import { PlaygroundResultChip } from '../../PlaygroundResultChip/PlaygroundResultChip'; import { useStyles } from './PlaygroundResultFeatureDetails.styles'; -import {CloseOutlined} from "@mui/icons-material"; -import React from "react"; +import { CloseOutlined } from '@mui/icons-material'; +import React from 'react'; interface PlaygroundFeatureResultDetailsProps { feature: PlaygroundFeatureSchema; - onClose: () => void + onClose: () => void; } export const PlaygroundResultFeatureDetails = ({ feature, @@ -21,7 +21,9 @@ export const PlaygroundResultFeatureDetails = ({ const reason = feature.isEnabled ? 'at least one strategy is True' : 'all strategies are False'; - const color = feature.isEnabled ? theme.palette.success.main : theme.palette.error.main; + const color = feature.isEnabled + ? theme.palette.success.main + : theme.palette.error.main; const onCloseClick = onClose && @@ -29,6 +31,7 @@ export const PlaygroundResultFeatureDetails = ({ event.stopPropagation(); onClose(); }); + return ( <>
@@ -40,7 +43,7 @@ export const PlaygroundResultFeatureDetails = ({
- onClose()} className={styles.icon}> + diff --git a/frontend/src/hooks/api/actions/usePlayground/playground.model.ts b/frontend/src/hooks/api/actions/usePlayground/playground.model.ts index fba4ce9432..eff504cda2 100644 --- a/frontend/src/hooks/api/actions/usePlayground/playground.model.ts +++ b/frontend/src/hooks/api/actions/usePlayground/playground.model.ts @@ -264,7 +264,6 @@ export interface PlaygroundFeatureStrategySegmentResult { result: boolean; constraints?: PlaygroundFeatureStrategyConstraintResult[]; } -6; export interface PlaygroundFeatureStrategyResult { id: string;