From 90d6b312645a66787151e6340be7027ca62cb160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Ramos?= Date: Thu, 15 Mar 2018 16:22:15 +0000 Subject: [PATCH] feat(instances): remove not working aff features --- .../__snapshots__/affinity.spec.js.snap | 30 ------ .../components/create-instance/affinity.js | 101 +++++++++--------- .../src/containers/create-instance/index.js | 3 - 3 files changed, 48 insertions(+), 86 deletions(-) diff --git a/packages/my-joy-instances/src/components/create-instance/__tests__/__snapshots__/affinity.spec.js.snap b/packages/my-joy-instances/src/components/create-instance/__tests__/__snapshots__/affinity.spec.js.snap index 1e074eea..e456b9e8 100644 --- a/packages/my-joy-instances/src/components/create-instance/__tests__/__snapshots__/affinity.spec.js.snap +++ b/packages/my-joy-instances/src/components/create-instance/__tests__/__snapshots__/affinity.spec.js.snap @@ -864,26 +864,11 @@ exports[`renders without throwing 1`] = ` > equalling - - - @@ -1726,26 +1711,11 @@ exports[`renders without throwing 2`] = ` > equalling - - - diff --git a/packages/my-joy-instances/src/components/create-instance/affinity.js b/packages/my-joy-instances/src/components/create-instance/affinity.js index 100e1ab8..1a8173df 100644 --- a/packages/my-joy-instances/src/components/create-instance/affinity.js +++ b/packages/my-joy-instances/src/components/create-instance/affinity.js @@ -21,14 +21,45 @@ const Values = touched => ( ); + // {rule.type === 'tag' ? ( + // + // + // + // + // + //
+ // and value{' '} + //
+ // + // {Values(rule.pattern)} + // + // + // + // + // + //
+ // ) : ( + export const Rule = ({ valid, ...rule }) => ( @@ -75,56 +106,20 @@ export const Rule = ({ valid, ...rule }) => ( - {rule.type === 'tag' ? ( - - - - - -
- and value{' '} -
- - {Values(rule.pattern)} - - - - - -
- ) : ( - - - {Values(rule.pattern)} - - - - - - - )} + + {Values(rule.pattern)} + + + + +
); diff --git a/packages/my-joy-instances/src/containers/create-instance/index.js b/packages/my-joy-instances/src/containers/create-instance/index.js index ca94405a..212c5fd3 100644 --- a/packages/my-joy-instances/src/containers/create-instance/index.js +++ b/packages/my-joy-instances/src/containers/create-instance/index.js @@ -281,10 +281,7 @@ export default compose( const patterns = { equalling: value => value, - 'not-equalling': value => `/^!${value}$/`, - containing: value => `/${value}/`, starting: value => `/^${value}/`, - ending: value => `/${value}$/` }; const _name = identity === 'name' ? 'instance' : name;