From 9139656ef2641231613cc302ac6567f5262f008b Mon Sep 17 00:00:00 2001 From: thuyvy3110 Date: Sat, 14 Dec 2019 18:52:28 +0700 Subject: [PATCH] Clean code + update translate --- public/translations/vn.json | 2 +- .../__snapshots__/Experiences.spec.tsx.snap | 16 ++++++++-------- views/components/certification/Cert_1.js | 12 ++++++------ views/components/certification/Cert_2.js | 12 ++++++------ views/components/certification/Prize_1.js | 12 ++++++------ views/components/certification/Prize_2.js | 12 ++++++------ .../__test__/__snapshots__/Loading.spec.tsx.snap | 8 ++++---- 7 files changed, 37 insertions(+), 37 deletions(-) diff --git a/public/translations/vn.json b/public/translations/vn.json index 8e2a5659..9613b27c 100644 --- a/public/translations/vn.json +++ b/public/translations/vn.json @@ -1,5 +1,5 @@ { - "CertResearch": "Cử nhân khoa học", + "CertResearch": "Cử nhân Khoa Học Máy Tính", "CertContentResearch": "Tốt nghiệp chương trình nâng cao ngành Khoa Học Máy Tính, Đại học Khoa Học Tự Nhiên HCM.", "CertDevelop": "Chứng chỉ giao tiếp: TOEFL ibt 85 pts", "CertContentDevelop": "TOEFL iBT® để đo khả năng thành thạo tiếng anh theo trình độ đại học. Đồng thời đánh giá sự phối hợp nhuần nhuyễn khi bạn sử dụng 4 kỹ năng nghe, nói, đọc, viết để hoàn thành chương trình học thuật.", diff --git a/views/components/__test__/__snapshots__/Experiences.spec.tsx.snap b/views/components/__test__/__snapshots__/Experiences.spec.tsx.snap index 0a8f18a4..130779e6 100644 --- a/views/components/__test__/__snapshots__/Experiences.spec.tsx.snap +++ b/views/components/__test__/__snapshots__/Experiences.spec.tsx.snap @@ -12,9 +12,9 @@ exports[`Experiences should render without throwing an error 1`] = ` "$$typeof": Symbol(react.forward_ref), "attrs": Array [], "componentStyle": ComponentStyle { - "componentId": "Container__Style-sc-1cprnoj-0", + "componentId": "Container__Style-ls6jfm-0", "isStatic": false, - "lastClassName": "gmMYEx", + "lastClassName": "kPautF", "rules": Array [ "padding-top:100px;@media screen and (max-width:800px){padding-top:50px;}", ], @@ -22,7 +22,7 @@ exports[`Experiences should render without throwing an error 1`] = ` "displayName": "Container__Style", "foldedComponentIds": Array [], "render": [Function], - "styledComponentId": "Container__Style-sc-1cprnoj-0", + "styledComponentId": "Container__Style-ls6jfm-0", "target": "section", "toString": [Function], "warnTooManyClasses": [Function], @@ -32,7 +32,7 @@ exports[`Experiences should render without throwing an error 1`] = ` forwardedRef={null} >

{ return ( - setSelectedItem(CERT_ACTIVE_ITEM[0])}> + setSelectedItem(CERT_ACTIVE_ITEM[0])}> - + - + <span>{CERT_ACTIVE_ITEM[0]}</span> — <Translate id={title} />

-
+
) } @@ -40,13 +40,13 @@ Cert_1.propTypes = { content: PropTypes.string } -const Cert_1Item = styled(Item)` +const CertItem = styled(Item)` left: 0%; margin-left: 0%; z-index: 40; ` -const Cert_1Info = styled(Info)` +const CertInfo = styled(Info)` visibility: ${props => props.itemSelected == CERT_ACTIVE_ITEM[0] ? 'visible' : 'hidden'}; diff --git a/views/components/certification/Cert_2.js b/views/components/certification/Cert_2.js index 7e62e2e4..26ff1d88 100644 --- a/views/components/certification/Cert_2.js +++ b/views/components/certification/Cert_2.js @@ -11,22 +11,22 @@ import { Translate } from 'react-localize-redux' const Cert_2 = ({ itemSelected, setSelectedItem, title, content }) => { return ( - setSelectedItem(CERT_ACTIVE_ITEM[1])}> + setSelectedItem(CERT_ACTIVE_ITEM[1])}> - + - + <span>{CERT_ACTIVE_ITEM[1]}</span> — <Translate id={title} />

-
+
) } @@ -40,12 +40,12 @@ Cert_2.propTypes = { content: PropTypes.string } -const Cert_2Item = styled(Item)` +const CertItem = styled(Item)` left: 37.5%; z-index: 30; ` -const Cert_2Info = styled(Info)` +const CertInfo = styled(Info)` visibility: ${props => props.itemSelected == CERT_ACTIVE_ITEM[1] ? 'visible' : 'hidden'}; diff --git a/views/components/certification/Prize_1.js b/views/components/certification/Prize_1.js index 654f4525..9d8c6a38 100644 --- a/views/components/certification/Prize_1.js +++ b/views/components/certification/Prize_1.js @@ -11,22 +11,22 @@ import { Translate } from 'react-localize-redux' const Prize_1 = ({ itemSelected, setSelectedItem, title, content }) => { return ( - setSelectedItem(CERT_ACTIVE_ITEM[2])}> + setSelectedItem(CERT_ACTIVE_ITEM[2])}> - + - + <span>{CERT_ACTIVE_ITEM[2]}</span> — <Translate id={title} />

-
+
) } @@ -40,12 +40,12 @@ Prize_1.propTypes = { content: PropTypes.string } -const Prize_1Item = styled(Item)` +const PrizeItem = styled(Item)` left: 62.5%; z-index: 20; ` -const Prize_1Info = styled(Info)` +const PrizeInfo = styled(Info)` visibility: ${props => props.itemSelected == CERT_ACTIVE_ITEM[2] ? 'visible' : 'hidden'}; diff --git a/views/components/certification/Prize_2.js b/views/components/certification/Prize_2.js index 0b5d0486..784de81b 100644 --- a/views/components/certification/Prize_2.js +++ b/views/components/certification/Prize_2.js @@ -11,22 +11,22 @@ import { Translate } from 'react-localize-redux' const Prize_2 = ({ itemSelected, setSelectedItem, title, content }) => { return ( - setSelectedItem(CERT_ACTIVE_ITEM[3])}> + setSelectedItem(CERT_ACTIVE_ITEM[3])}> - + - + <span>{CERT_ACTIVE_ITEM[3]}</span> — <Translate id={title} />

-
+
) } @@ -40,12 +40,12 @@ Prize_2.propTypes = { content: PropTypes.string } -const Prize_2Item = styled(Item)` +const PrizeItem = styled(Item)` left: 87.5%; z-index: 10; ` -const Prize_2Info = styled(Info)` +const PrizeInfo = styled(Info)` visibility: ${props => props.itemSelected == CERT_ACTIVE_ITEM[3] ? 'visible' : 'hidden'}; diff --git a/views/original-components/__test__/__snapshots__/Loading.spec.tsx.snap b/views/original-components/__test__/__snapshots__/Loading.spec.tsx.snap index 3aaf6f7d..40cee6ca 100644 --- a/views/original-components/__test__/__snapshots__/Loading.spec.tsx.snap +++ b/views/original-components/__test__/__snapshots__/Loading.spec.tsx.snap @@ -2,13 +2,13 @@ exports[`Loading should render without throwing an error 1`] = `
.progress-theme.__jsx-style-dynamic-selector{-webkit-transition:all 0.2s ease-out;-moz-transition:all 0.2s ease-out;-o-transition:all 0.2s ease-out;-webkit-transition:all 0.2s ease-out;transition:all 0.2s ease-out;z-index:9999999;position:fixed;left:0;right:0;top:0;bottom:0;}.inner.__jsx-style-dynamic-selector{height:100%;width:100%;-webkit-transition:all 0.3s ease-out;-moz-transition:all 0.3s ease-out;-o-transition:all 0.3s ease-out;-webkit-transition:all 0.3s ease-out;transition:all 0.3s ease-out;}.loader.__jsx-style-dynamic-selector{position:absolute;top:40%;left:50%;display:block;width:200px;height:120px;margin-left:-100px;margin-top:-60px;text-align:center;font-size:24px;line-height:90px;}