aboutsummaryrefslogtreecommitdiffstats
path: root/workflow-designer-ui/src/main/frontend/src/features/version/general/GeneralView.js
diff options
context:
space:
mode:
authorMalek <malek.zoabi@amdocs.com>2018-08-09 12:07:58 +0300
committerMalek <malek.zoabi@amdocs.com>2018-08-09 12:08:27 +0300
commitdbba16253408ae28d6fe32030112bb8521431e57 (patch)
treeb579fcac1814e4ea0206d43dc64cdda54515226b /workflow-designer-ui/src/main/frontend/src/features/version/general/GeneralView.js
parent923910109f7796aca1263df1a7fa13f7d6bc072c (diff)
Fix errors and warnings
Issue-ID: SDC-1622 Change-Id: I1a284c29ed1332545752bf04c14027d1199bbd4e Signed-off-by: Malek <malek.zoabi@amdocs.com>
Diffstat (limited to 'workflow-designer-ui/src/main/frontend/src/features/version/general/GeneralView.js')
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/version/general/GeneralView.js55
1 files changed, 29 insertions, 26 deletions
diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/general/GeneralView.js b/workflow-designer-ui/src/main/frontend/src/features/version/general/GeneralView.js
index 930c6071..d10d5784 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/version/general/GeneralView.js
+++ b/workflow-designer-ui/src/main/frontend/src/features/version/general/GeneralView.js
@@ -5,9 +5,9 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+* http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
+* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
@@ -16,36 +16,39 @@
import React from 'react';
import PropTypes from 'prop-types';
-import { I18n, Localize, Translate } from 'react-redux-i18n';
+import { I18n, Translate } from 'react-redux-i18n';
import Description from 'shared/components/Description';
import { VersionInfo, LabeledValue } from 'shared/components/VersionInfo';
-const GeneralView = ({ onDataChange, description, created, modified }) => (
- <div className="general-page">
- <div className="general-page-title">
- <Translate value="workflow.general.headerTitle" />
- </div>
- <div className="general-page-content">
- <Description
- description={description}
- onDataChange={onDataChange}
- />
- <VersionInfo>
- <LabeledValue
- title={I18n.t('workflow.general.modified')}
- value={
- <Localize value={modified} dateFormat="date.short" />
- }
- />
- <LabeledValue
- title={I18n.t('workflow.general.created')}
- value={<Localize value={created} dateFormat="date.short" />}
+const GeneralView = ({ onDataChange, description, created, modified }) => {
+ const modifiedValue = I18n.l(modified, { dateFormat: 'date.short' });
+ const createdValue = I18n.l(created, { dateFormat: 'date.short' });
+
+ return (
+ <div className="general-page">
+ <div className="general-page-title">
+ <Translate value="workflow.general.headerTitle" />
+ </div>
+ <div className="general-page-content">
+ <Description
+ description={description}
+ onDataChange={onDataChange}
/>
- </VersionInfo>
+ <VersionInfo>
+ <LabeledValue
+ title={I18n.t('workflow.general.modified')}
+ value={modifiedValue}
+ />
+ <LabeledValue
+ title={I18n.t('workflow.general.created')}
+ value={createdValue}
+ />
+ </VersionInfo>
+ </div>
</div>
- </div>
-);
+ );
+};
GeneralView.propTypes = {
onDataChange: PropTypes.func,