mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-26 13:48:33 +02:00
chore: remove operator upgrade alert (#8053)
This was introduced in v4.9 and most likely people have upgraded already. Removing.
This commit is contained in:
parent
363911c4a1
commit
29af716952
@ -3,10 +3,6 @@ import type { IConstraint } from 'interfaces/strategy';
|
||||
import { CANCEL } from '../ConstraintAccordionEdit';
|
||||
|
||||
import type React from 'react';
|
||||
import { newOperators } from 'constants/operators';
|
||||
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import { oneOf } from 'utils/oneOf';
|
||||
import { OperatorUpgradeAlert } from 'component/common/OperatorUpgradeAlert/OperatorUpgradeAlert';
|
||||
|
||||
interface IConstraintAccordionBody {
|
||||
localConstraint: IConstraint;
|
||||
@ -50,13 +46,7 @@ export const ConstraintAccordionEditBody: React.FC<
|
||||
> = ({ localConstraint, children, triggerTransition, setAction, onSubmit }) => {
|
||||
return (
|
||||
<>
|
||||
<StyledInputContainer>
|
||||
<ConditionallyRender
|
||||
condition={oneOf(newOperators, localConstraint.operator)}
|
||||
show={<OperatorUpgradeAlert />}
|
||||
/>
|
||||
{children}
|
||||
</StyledInputContainer>
|
||||
<StyledInputContainer>{children}</StyledInputContainer>
|
||||
<StyledButtonContainer>
|
||||
<StyledInputButtonContainer>
|
||||
<StyledLeftButton
|
||||
|
@ -2,10 +2,6 @@ import { Button, styled } from '@mui/material';
|
||||
import type { IConstraint } from 'interfaces/strategy';
|
||||
|
||||
import type React from 'react';
|
||||
import { newOperators } from 'constants/operators';
|
||||
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import { oneOf } from 'utils/oneOf';
|
||||
import { OperatorUpgradeAlert } from 'component/common/OperatorUpgradeAlert/OperatorUpgradeAlert';
|
||||
|
||||
interface IConstraintAccordionBody {
|
||||
localConstraint: IConstraint;
|
||||
@ -49,13 +45,7 @@ export const ConstraintAccordionEditBody: React.FC<
|
||||
> = ({ localConstraint, children, triggerTransition, setAction, onSubmit }) => {
|
||||
return (
|
||||
<>
|
||||
<StyledInputContainer>
|
||||
<ConditionallyRender
|
||||
condition={oneOf(newOperators, localConstraint.operator)}
|
||||
show={<OperatorUpgradeAlert />}
|
||||
/>
|
||||
{children}
|
||||
</StyledInputContainer>
|
||||
<StyledInputContainer>{children}</StyledInputContainer>
|
||||
<StyledButtonContainer>
|
||||
<StyledInputButtonContainer>
|
||||
<StyledLeftButton
|
||||
|
@ -1,22 +0,0 @@
|
||||
import { Alert } from '@mui/material';
|
||||
|
||||
export const OperatorUpgradeAlert = () => {
|
||||
return (
|
||||
<Alert severity='warning'>
|
||||
Remember to update your Unleash client! New operators require new
|
||||
SDK versions. <OperatorDocsLink />.
|
||||
</Alert>
|
||||
);
|
||||
};
|
||||
|
||||
const OperatorDocsLink = () => {
|
||||
return (
|
||||
<a
|
||||
href='https://docs.getunleash.io/reference/strategy-constraints#strategy-constraint-operators'
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
>
|
||||
Read more
|
||||
</a>
|
||||
);
|
||||
};
|
@ -1,7 +1,6 @@
|
||||
import { Link, useNavigate } from 'react-router-dom';
|
||||
import { Button, IconButton, styled } from '@mui/material';
|
||||
import CloseOutlined from '@mui/icons-material/CloseOutlined';
|
||||
import { OperatorUpgradeAlert } from 'component/common/OperatorUpgradeAlert/OperatorUpgradeAlert';
|
||||
|
||||
const StyledContainer = styled('section')(({ theme }) => ({
|
||||
backgroundColor: theme.palette.primary.light,
|
||||
@ -164,7 +163,6 @@ export const SplashPageOperators = () => {
|
||||
</p>
|
||||
</StyledFooter>
|
||||
</StyledContent>
|
||||
<OperatorUpgradeAlert />
|
||||
</StyledContainer>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user