From 5f2f7f073edb52aeefd7431fa16382db387ec84a Mon Sep 17 00:00:00 2001 From: Clement G Date: Sat, 18 Apr 2020 15:27:41 +0200 Subject: [PATCH 01/20] fix(footer): add target="_blank" on footer's link #29 --- src/components/layouts/Footer.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/layouts/Footer.jsx b/src/components/layouts/Footer.jsx index 894011a..fe8dbdf 100644 --- a/src/components/layouts/Footer.jsx +++ b/src/components/layouts/Footer.jsx @@ -24,9 +24,9 @@ class Footer extends Component { ); diff --git a/src/i18n.jsx b/src/i18n.jsx index 3d49bbc..c174260 100644 --- a/src/i18n.jsx +++ b/src/i18n.jsx @@ -3,13 +3,13 @@ import XHR from 'i18next-xhr-backend'; import LanguageDetector from 'i18next-browser-languagedetector'; import { initReactI18next } from 'react-i18next'; - +console.log("locale="+navigator.language); i18n .use(XHR) .use(LanguageDetector) .use(initReactI18next) // bind react-i18next to the instance .init({ - fallbackLng: 'en', + fallbackLng: 'en_GB', debug: true, saveMissing: true, // send not translated keys to endpoint From 41d3cce977858ca5062cd7486ccbebf828f7dbf8 Mon Sep 17 00:00:00 2001 From: Clement G Date: Sat, 18 Apr 2020 19:12:23 +0200 Subject: [PATCH 09/20] feat(Paypal): revert change local system (wip) #31 --- i18n.config.js | 2 +- public/locale/i18n/{en_GB => en}/common.json | 0 public/locale/i18n/{en_GB => en}/locale.json | 0 public/locale/i18n/{en_GB => en}/resource.json | 0 public/locale/i18n/{es_ES => es}/common.json | 0 public/locale/i18n/{es_ES => es}/locale.json | 0 public/locale/i18n/{es_ES => es}/resource.json | 0 public/locale/i18n/{fr_FR => fr}/common.json | 0 public/locale/i18n/{fr_FR => fr}/locale.json | 0 public/locale/i18n/{fr_FR => fr}/resource.json | 0 src/components/banner/Paypal.jsx | 12 +++++++++--- src/components/layouts/Footer.jsx | 8 +++----- src/i18n.jsx | 4 ++-- 13 files changed, 15 insertions(+), 11 deletions(-) rename public/locale/i18n/{en_GB => en}/common.json (100%) rename public/locale/i18n/{en_GB => en}/locale.json (100%) rename public/locale/i18n/{en_GB => en}/resource.json (100%) rename public/locale/i18n/{es_ES => es}/common.json (100%) rename public/locale/i18n/{es_ES => es}/locale.json (100%) rename public/locale/i18n/{es_ES => es}/resource.json (100%) rename public/locale/i18n/{fr_FR => fr}/common.json (100%) rename public/locale/i18n/{fr_FR => fr}/locale.json (100%) rename public/locale/i18n/{fr_FR => fr}/resource.json (100%) diff --git a/i18n.config.js b/i18n.config.js index 23c2c61..efcbe45 100644 --- a/i18n.config.js +++ b/i18n.config.js @@ -30,7 +30,7 @@ module.exports = { // Check out https://github.com/acornjs/acorn/tree/master/acorn#interface for additional options } }, - lngs: ["en_GB", "fr_FR", "es_ES"], + lngs: ["en", "fr", "es"], ns: ["resource", "common"], defaultLng: "en", defaultNs: "resource", diff --git a/public/locale/i18n/en_GB/common.json b/public/locale/i18n/en/common.json similarity index 100% rename from public/locale/i18n/en_GB/common.json rename to public/locale/i18n/en/common.json diff --git a/public/locale/i18n/en_GB/locale.json b/public/locale/i18n/en/locale.json similarity index 100% rename from public/locale/i18n/en_GB/locale.json rename to public/locale/i18n/en/locale.json diff --git a/public/locale/i18n/en_GB/resource.json b/public/locale/i18n/en/resource.json similarity index 100% rename from public/locale/i18n/en_GB/resource.json rename to public/locale/i18n/en/resource.json diff --git a/public/locale/i18n/es_ES/common.json b/public/locale/i18n/es/common.json similarity index 100% rename from public/locale/i18n/es_ES/common.json rename to public/locale/i18n/es/common.json diff --git a/public/locale/i18n/es_ES/locale.json b/public/locale/i18n/es/locale.json similarity index 100% rename from public/locale/i18n/es_ES/locale.json rename to public/locale/i18n/es/locale.json diff --git a/public/locale/i18n/es_ES/resource.json b/public/locale/i18n/es/resource.json similarity index 100% rename from public/locale/i18n/es_ES/resource.json rename to public/locale/i18n/es/resource.json diff --git a/public/locale/i18n/fr_FR/common.json b/public/locale/i18n/fr/common.json similarity index 100% rename from public/locale/i18n/fr_FR/common.json rename to public/locale/i18n/fr/common.json diff --git a/public/locale/i18n/fr_FR/locale.json b/public/locale/i18n/fr/locale.json similarity index 100% rename from public/locale/i18n/fr_FR/locale.json rename to public/locale/i18n/fr/locale.json diff --git a/public/locale/i18n/fr_FR/resource.json b/public/locale/i18n/fr/resource.json similarity index 100% rename from public/locale/i18n/fr_FR/resource.json rename to public/locale/i18n/fr/resource.json diff --git a/src/components/banner/Paypal.jsx b/src/components/banner/Paypal.jsx index e116302..14e82fa 100644 --- a/src/components/banner/Paypal.jsx +++ b/src/components/banner/Paypal.jsx @@ -4,17 +4,23 @@ import i18n from '../../i18n' const Paypal = (props) => { - const localeStringShort=i18n.language.substring(0,2); - const localeStringComplete=localeStringShort.toLowerCase()+"_"+localeStringShort.toUpperCase(); + let localeStringShort=i18n.language.substring(0,2); + let localeStringComplete=localeStringShort.toLowerCase()+"_"+localeStringShort.toUpperCase(); + if(localeStringComplete==="en_EN"){ + localeStringComplete="en_US"; + localeStringShort="FR"; + } const imageLink="https://www.paypalobjects.com/"+localeStringComplete+"/"+localeStringShort.toUpperCase()+"/i/btn/btn_donateCC_LG.gif"; const pixelLink="https://www.paypal.com/"+localeStringComplete+"/i/scr/pixel.gif"; + return ( +
-
); +
); }; diff --git a/src/components/layouts/Footer.jsx b/src/components/layouts/Footer.jsx index aaf5657..b565531 100644 --- a/src/components/layouts/Footer.jsx +++ b/src/components/layouts/Footer.jsx @@ -4,7 +4,6 @@ import { Link } from "react-router-dom"; import { FlagIcon } from '../flag' import i18n from '../../i18n' -import Helloasso from "../banner/Helloasso"; import Paypal from "../banner/Paypal"; class Footer extends Component { @@ -29,19 +28,18 @@ class Footer extends Component { - {t("Who are we")} - - {" "} - {" "} -
-
diff --git a/src/i18n.jsx b/src/i18n.jsx index c174260..3d49bbc 100644 --- a/src/i18n.jsx +++ b/src/i18n.jsx @@ -3,13 +3,13 @@ import XHR from 'i18next-xhr-backend'; import LanguageDetector from 'i18next-browser-languagedetector'; import { initReactI18next } from 'react-i18next'; -console.log("locale="+navigator.language); + i18n .use(XHR) .use(LanguageDetector) .use(initReactI18next) // bind react-i18next to the instance .init({ - fallbackLng: 'en_GB', + fallbackLng: 'en', debug: true, saveMissing: true, // send not translated keys to endpoint From 2ba9564c5c0b1a0df07a44f60c5194378f61ad55 Mon Sep 17 00:00:00 2001 From: Clement G Date: Sat, 18 Apr 2020 19:27:25 +0200 Subject: [PATCH 10/20] feat(Paypal): fix height to remove vertical scrollbar #31 --- src/components/banner/Paypal.jsx | 2 +- src/scss/_app.scss | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/banner/Paypal.jsx b/src/components/banner/Paypal.jsx index 14e82fa..7cc6275 100644 --- a/src/components/banner/Paypal.jsx +++ b/src/components/banner/Paypal.jsx @@ -14,7 +14,7 @@ const Paypal = (props) => { const pixelLink="https://www.paypal.com/"+localeStringComplete+"/i/scr/pixel.gif"; return ( -
+
diff --git a/src/scss/_app.scss b/src/scss/_app.scss index 03d3f89..f9cc227 100644 --- a/src/scss/_app.scss +++ b/src/scss/_app.scss @@ -47,10 +47,10 @@ main { background-attachment: fixed; background-repeat: no-repeat; background-color: $mv-blue-color; - min-height: calc(100% - 106px); + min-height: calc(100% - 170px); overflow: auto; padding-top: 72px; - padding-bottom: 36px; + padding-bottom: 100px; } header { From 1f7d51dad48763c90a7f3f55b30433878f90b862 Mon Sep 17 00:00:00 2001 From: Clement G Date: Sat, 18 Apr 2020 20:42:10 +0200 Subject: [PATCH 11/20] feat(locale): Add dropdown to select language (wip) --- package.json | 1 + src/components/layouts/Footer.jsx | 12 -- src/components/layouts/Header.jsx | 8 +- src/components/layouts/LanguageSelector.jsx | 31 ++++ yarn.lock | 153 +++++++++++++++++++- 5 files changed, 185 insertions(+), 20 deletions(-) create mode 100644 src/components/layouts/LanguageSelector.jsx diff --git a/package.json b/package.json index a2b533a..59526ca 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "react-dev-utils": "^9.0.1", "react-dom": "^16.8.6", "react-flag-icon-css": "^1.0.25", + "react-flags-select": "^1.1.12", "react-i18next": "^11.3.4", "react-loader-spinner": "^3.1.14", "react-multi-email": "^0.5.3", diff --git a/src/components/layouts/Footer.jsx b/src/components/layouts/Footer.jsx index b565531..432f3d4 100644 --- a/src/components/layouts/Footer.jsx +++ b/src/components/layouts/Footer.jsx @@ -27,18 +27,6 @@ class Footer extends Component { {t("Source code")} - {t("Who are we")} - - - - {" "} - - {" "} -
diff --git a/src/components/layouts/Header.jsx b/src/components/layouts/Header.jsx index 3b4009d..5cb1e29 100644 --- a/src/components/layouts/Header.jsx +++ b/src/components/layouts/Header.jsx @@ -7,6 +7,7 @@ import { withTranslation } from 'react-i18next'; import logo from "../../logos/logo-color.svg"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faRocket } from "@fortawesome/free-solid-svg-icons"; +import LanguageSelector from "./LanguageSelector"; class Header extends Component { state = { @@ -44,10 +45,13 @@ class Header extends Component { diff --git a/src/components/layouts/LanguageSelector.jsx b/src/components/layouts/LanguageSelector.jsx new file mode 100644 index 0000000..bd20d69 --- /dev/null +++ b/src/components/layouts/LanguageSelector.jsx @@ -0,0 +1,31 @@ +import React from 'react'; +import ReactFlagsSelect from 'react-flags-select'; +import 'react-flags-select/css/react-flags-select.css'; + +import i18n from '../../i18n' + + + +const LanguageSelector = () => { + + const selectHandler = (e) => { + let locale=e.toLowerCase(); + if(locale==="gb")locale="en"; + i18n.changeLanguage(locale); + }; + + let locale=i18n.language.substring(0,2).toUpperCase() + if(locale==="EN")locale="GB"; + return (); +}; + + +export default LanguageSelector; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 6591b92..587e2a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -188,7 +188,7 @@ dependencies: "@babel/types" "^7.8.3" -"@babel/helper-module-imports@^7.8.3": +"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498" integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg== @@ -918,7 +918,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.2", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.2", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7": version "7.9.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06" integrity sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q== @@ -976,6 +976,83 @@ resolved "https://registry.yarnpkg.com/@csstools/normalize.css/-/normalize.css-9.0.1.tgz#c27b391d8457d1e893f1eddeaf5e5412d12ffbb5" integrity sha512-6It2EVfGskxZCQhuykrfnALg7oVeiI6KclWSmGDqB0AiInVrTGB9Jp9i4/Ad21u9Jde/voVQz6eFX/eSg/UsPA== +"@emotion/cache@^10.0.27", "@emotion/cache@^10.0.9": + version "10.0.29" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.29.tgz#87e7e64f412c060102d589fe7c6dc042e6f9d1e0" + integrity sha512-fU2VtSVlHiF27empSbxi1O2JFdNWZO+2NFHfwO0pxgTep6Xa3uGb+3pVKfLww2l/IBGLNEZl5Xf/++A4wAYDYQ== + dependencies: + "@emotion/sheet" "0.9.4" + "@emotion/stylis" "0.8.5" + "@emotion/utils" "0.11.3" + "@emotion/weak-memoize" "0.2.5" + +"@emotion/core@^10.0.9": + version "10.0.28" + resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.28.tgz#bb65af7262a234593a9e952c041d0f1c9b9bef3d" + integrity sha512-pH8UueKYO5jgg0Iq+AmCLxBsvuGtvlmiDCOuv8fGNYn3cowFpLN98L8zO56U0H1PjDIyAlXymgL3Wu7u7v6hbA== + dependencies: + "@babel/runtime" "^7.5.5" + "@emotion/cache" "^10.0.27" + "@emotion/css" "^10.0.27" + "@emotion/serialize" "^0.11.15" + "@emotion/sheet" "0.9.4" + "@emotion/utils" "0.11.3" + +"@emotion/css@^10.0.27", "@emotion/css@^10.0.9": + version "10.0.27" + resolved "https://registry.yarnpkg.com/@emotion/css/-/css-10.0.27.tgz#3a7458198fbbebb53b01b2b87f64e5e21241e14c" + integrity sha512-6wZjsvYeBhyZQYNrGoR5yPMYbMBNEnanDrqmsqS1mzDm1cOTu12shvl2j4QHNS36UaTE0USIJawCH9C8oW34Zw== + dependencies: + "@emotion/serialize" "^0.11.15" + "@emotion/utils" "0.11.3" + babel-plugin-emotion "^10.0.27" + +"@emotion/hash@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" + integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== + +"@emotion/memoize@0.7.4": + version "0.7.4" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" + integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== + +"@emotion/serialize@^0.11.15", "@emotion/serialize@^0.11.16": + version "0.11.16" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.16.tgz#dee05f9e96ad2fb25a5206b6d759b2d1ed3379ad" + integrity sha512-G3J4o8by0VRrO+PFeSc3js2myYNOXVJ3Ya+RGVxnshRYgsvErfAOglKAiy1Eo1vhzxqtUvjCyS5gtewzkmvSSg== + dependencies: + "@emotion/hash" "0.8.0" + "@emotion/memoize" "0.7.4" + "@emotion/unitless" "0.7.5" + "@emotion/utils" "0.11.3" + csstype "^2.5.7" + +"@emotion/sheet@0.9.4": + version "0.9.4" + resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.4.tgz#894374bea39ec30f489bbfc3438192b9774d32e5" + integrity sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA== + +"@emotion/stylis@0.8.5": + version "0.8.5" + resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" + integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== + +"@emotion/unitless@0.7.5": + version "0.7.5" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" + integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== + +"@emotion/utils@0.11.3": + version "0.11.3" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz#a759863867befa7e583400d322652a3f44820924" + integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw== + +"@emotion/weak-memoize@0.2.5": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" + integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== + "@fortawesome/fontawesome-common-types@^0.2.28": version "0.2.28" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.28.tgz#1091bdfe63b3f139441e9cba27aa022bff97d8b2" @@ -2075,6 +2152,22 @@ babel-plugin-dynamic-import-node@^2.3.0: dependencies: object.assign "^4.1.0" +babel-plugin-emotion@^10.0.27: + version "10.0.33" + resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-10.0.33.tgz#ce1155dcd1783bbb9286051efee53f4e2be63e03" + integrity sha512-bxZbTTGz0AJQDHm8k6Rf3RQJ8tX2scsfsRyKVgAbiUPUNIRtlK+7JxP+TAd1kRLABFxe0CFm2VdK4ePkoA9FxQ== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@emotion/hash" "0.8.0" + "@emotion/memoize" "0.7.4" + "@emotion/serialize" "^0.11.16" + babel-plugin-macros "^2.0.0" + babel-plugin-syntax-jsx "^6.18.0" + convert-source-map "^1.5.0" + escape-string-regexp "^1.0.5" + find-root "^1.1.0" + source-map "^0.5.7" + babel-plugin-istanbul@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz#df4ade83d897a92df069c4d9a25cf2671293c854" @@ -2092,7 +2185,7 @@ babel-plugin-jest-hoist@^24.9.0: dependencies: "@types/babel__traverse" "^7.0.6" -babel-plugin-macros@2.8.0: +babel-plugin-macros@2.8.0, babel-plugin-macros@^2.0.0: version "2.8.0" resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== @@ -2106,6 +2199,11 @@ babel-plugin-named-asset-import@^0.3.2: resolved "https://registry.yarnpkg.com/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.6.tgz#c9750a1b38d85112c9e166bf3ef7c5dbc605f4be" integrity sha512-1aGDUfL1qOOIoqk9QKGIo2lANk+C7ko/fqH0uIyC71x3PEGz0uVP8ISgfEsFuG+FKmjHTvFK/nNM8dowpmUxLA== +babel-plugin-syntax-jsx@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= + babel-plugin-syntax-object-rest-spread@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" @@ -3339,6 +3437,11 @@ cssstyle@^1.0.0, cssstyle@^1.1.1: dependencies: cssom "0.3.x" +csstype@^2.5.7: + version "2.6.10" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.10.tgz#e63af50e66d7c266edb6b32909cfd0aabe03928b" + integrity sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w== + csstype@^2.6.7: version "2.6.9" resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.9.tgz#05141d0cd557a56b8891394c1911c40c8a98d098" @@ -4453,6 +4556,11 @@ find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" +find-root@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" + integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== + find-up@3.0.0, find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -6829,6 +6937,11 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" +memoize-one@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" + integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== + memory-fs@^0.4.1, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" @@ -8681,7 +8794,7 @@ prop-types-exact@^1.2.0: object.assign "^4.1.0" reflect.ownkeys "^0.2.0" -prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -8921,6 +9034,13 @@ react-flag-icon-css@^1.0.25: flag-icon-css "^3.2.1" prop-types "^15.6.2" +react-flags-select@^1.1.12: + version "1.1.12" + resolved "https://registry.yarnpkg.com/react-flags-select/-/react-flags-select-1.1.12.tgz#428b34f928eab875e8e0296046410d30d75cb818" + integrity sha512-icWC8pHdfTQTIqpLTgPcd4tFlfgUdiwzUJaSkPMzP6BEMRrh8yAJC55IkgmJV8PIX8qTUrEETZ6+6115hGjR7g== + dependencies: + prop-types "^15.5.8" + react-i18next@^11.3.4: version "11.3.4" resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.3.4.tgz#355df5fe5133e5e30302d166f529678100ffc968" @@ -8929,6 +9049,13 @@ react-i18next@^11.3.4: "@babel/runtime" "^7.3.1" html-parse-stringify2 "2.0.1" +react-input-autosize@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.2.2.tgz#fcaa7020568ec206bc04be36f4eb68e647c4d8c2" + integrity sha512-jQJgYCA3S0j+cuOwzuCd1OjmBmnZLdqQdiLKRYrsMMzbjUrVDS5RvJUDwJqA7sKuksDuzFtm6hZGKFu7Mjk5aw== + dependencies: + prop-types "^15.5.8" + react-is@^16.12.0, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6, react-is@^16.9.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" @@ -8994,6 +9121,20 @@ react-router@5.1.2: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" +react-select@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.1.0.tgz#ab098720b2e9fe275047c993f0d0caf5ded17c27" + integrity sha512-wBFVblBH1iuCBprtpyGtd1dGMadsG36W5/t2Aj8OE6WbByDg5jIFyT7X5gT+l0qmT5TqWhxX+VsKJvCEl2uL9g== + dependencies: + "@babel/runtime" "^7.4.4" + "@emotion/cache" "^10.0.9" + "@emotion/core" "^10.0.9" + "@emotion/css" "^10.0.9" + memoize-one "^5.0.0" + prop-types "^15.6.0" + react-input-autosize "^2.2.2" + react-transition-group "^4.3.0" + react-sortable-hoc@^1.9.1: version "1.11.0" resolved "https://registry.yarnpkg.com/react-sortable-hoc/-/react-sortable-hoc-1.11.0.tgz#fe4022362bbafc4b836f5104b9676608a40a278f" @@ -9033,7 +9174,7 @@ react-transition-group@^2.3.1: prop-types "^15.6.2" react-lifecycles-compat "^3.0.4" -react-transition-group@^4: +react-transition-group@^4, react-transition-group@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.3.0.tgz#fea832e386cf8796c58b61874a3319704f5ce683" integrity sha512-1qRV1ZuVSdxPlPf4O8t7inxUGpdyO5zG9IoNfJxSO0ImU2A1YWkEQvFPuIPZmMLkg5hYs7vv5mMOyfgSkvAwvw== @@ -9924,7 +10065,7 @@ source-map@^0.4.2: dependencies: amdefine ">=0.0.4" -source-map@^0.5.0, source-map@^0.5.6: +source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= From 4e7665e2f5054ff53494938c90fa8e64b9077a96 Mon Sep 17 00:00:00 2001 From: Clement G Date: Sun, 19 Apr 2020 11:49:43 +0200 Subject: [PATCH 12/20] style(error-code): prettier auto-format --- src/Errors.js | 44 ++++++++++++++++++++------------------------ src/errorCode.js | 36 ++++++++++++++++++------------------ 2 files changed, 38 insertions(+), 42 deletions(-) diff --git a/src/Errors.js b/src/Errors.js index 27f8c11..2a92c08 100644 --- a/src/Errors.js +++ b/src/Errors.js @@ -1,45 +1,41 @@ -import React from 'react'; -import { - Container, - Row, - Col, -} from "reactstrap"; +import React from "react"; +import { Container, Row, Col } from "reactstrap"; -export const UNKNOWN_ELECTION_ERROR = 'E1'; -export const ONGOING_ELECTION_ERROR = 'E2'; -export const NO_VOTE_ERROR = 'E3'; -export const ELECTION_NOT_STARTED_ERROR = 'E4'; -export const ELECTION_FINISHED_ERROR = 'E5'; -export const INVITATION_ONLY_ERROR = 'E6'; -export const UNKNOWN_TOKEN_ERROR = 'E7'; -export const USED_TOKEN_ERROR = 'E8'; -export const WRONG_ELECTION_ERROR = 'E9'; +export const UNKNOWN_ELECTION_ERROR = "E1"; +export const ONGOING_ELECTION_ERROR = "E2"; +export const NO_VOTE_ERROR = "E3"; +export const ELECTION_NOT_STARTED_ERROR = "E4"; +export const ELECTION_FINISHED_ERROR = "E5"; +export const INVITATION_ONLY_ERROR = "E6"; +export const UNKNOWN_TOKEN_ERROR = "E7"; +export const USED_TOKEN_ERROR = "E8"; +export const WRONG_ELECTION_ERROR = "E9"; export const redirectError = (errorMsg, history) => {}; export const errorMessage = (error, t) => { if (error.startsWith(UNKNOWN_ELECTION_ERROR)) { - return t('Oops... The election is unknown.'); + return t("Oops... The election is unknown."); } else if (error.startsWith(ONGOING_ELECTION_ERROR)) { return t( - "The election is still going on. You can't access now to the results.", + "The election is still going on. You can't access now to the results." ); } else if (error.startsWith(NO_VOTE_ERROR)) { - return t('No votes have been recorded yet. Come back later.'); + return t("No votes have been recorded yet. Come back later."); } else if (error.startsWith(ELECTION_NOT_STARTED_ERROR)) { - return t('The election has not started yet.'); + return t("The election has not started yet."); } else if (error.startsWith(ELECTION_FINISHED_ERROR)) { - return t('The election is over. You can\'t vote anymore'); + return t("The election is over. You can't vote anymore"); } else if (error.startsWith(INVITATION_ONLY_ERROR)) { - return t('You need a token to vote in this election'); + return t("You need a token to vote in this election"); } else if (error.startsWith(USED_TOKEN_ERROR)) { - return t('You seem to have already voted.'); + return t("You seem to have already voted."); } else if (error.startsWith(WRONG_ELECTION_ERROR)) { - return t('The parameters of the election are incorrect.'); + return t("The parameters of the election are incorrect."); } }; -export const Error = (props) => ( +export const Error = props => ( diff --git a/src/errorCode.js b/src/errorCode.js index 7299b1a..4d763fa 100644 --- a/src/errorCode.js +++ b/src/errorCode.js @@ -1,35 +1,35 @@ -import React from 'react'; +import React from "react"; -export const UNKNOWN_ELECTION_ERROR = 'E1'; -export const ONGOING_ELECTION_ERROR = 'E2'; -export const NO_VOTE_ERROR = 'E3'; -export const ELECTION_NOT_STARTED_ERROR = 'E4'; -export const ELECTION_FINISHED_ERROR = 'E5'; -export const INVITATION_ONLY_ERROR = 'E6'; -export const UNKNOWN_TOKEN_ERROR = 'E7'; -export const USED_TOKEN_ERROR = 'E8'; -export const WRONG_ELECTION_ERROR = 'E9'; +export const UNKNOWN_ELECTION_ERROR = "E1"; +export const ONGOING_ELECTION_ERROR = "E2"; +export const NO_VOTE_ERROR = "E3"; +export const ELECTION_NOT_STARTED_ERROR = "E4"; +export const ELECTION_FINISHED_ERROR = "E5"; +export const INVITATION_ONLY_ERROR = "E6"; +export const UNKNOWN_TOKEN_ERROR = "E7"; +export const USED_TOKEN_ERROR = "E8"; +export const WRONG_ELECTION_ERROR = "E9"; export const redirectError = (errorMsg, history) => {}; export const errorMessage = (error, t) => { if (error.startsWith(UNKNOWN_ELECTION_ERROR)) { - return t('Oops... The election is unknown.'); + return t("Oops... The election is unknown."); } else if (error.startsWith(ONGOING_ELECTION_ERROR)) { return t( - "The election is still going on. You can't access now to the results.", + "The election is still going on. You can't access now to the results." ); } else if (error.startsWith(NO_VOTE_ERROR)) { - return t('No votes have been recorded yet. Come back later.'); + return t("No votes have been recorded yet. Come back later."); } else if (error.startsWith(ELECTION_NOT_STARTED_ERROR)) { - return t('The election has not started yet.'); + return t("The election has not started yet."); } else if (error.startsWith(ELECTION_FINISHED_ERROR)) { - return t('The election is over. You can\'t vote anymore'); + return t("The election is over. You can't vote anymore"); } else if (error.startsWith(INVITATION_ONLY_ERROR)) { - return t('You need a token to vote in this election'); + return t("You need a token to vote in this election"); } else if (error.startsWith(USED_TOKEN_ERROR)) { - return t('You seem to have already voted.'); + return t("You seem to have already voted."); } else if (error.startsWith(WRONG_ELECTION_ERROR)) { - return t('The parameters of the election are incorrect.'); + return t("The parameters of the election are incorrect."); } }; From 159780431f0a7d6dd32d73d1217435900ab8c846 Mon Sep 17 00:00:00 2001 From: Clement G Date: Sun, 19 Apr 2020 11:59:22 +0200 Subject: [PATCH 13/20] feat(paypal): reduce margin --- src/components/banner/Paypal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/banner/Paypal.jsx b/src/components/banner/Paypal.jsx index 7cc6275..a3468ef 100644 --- a/src/components/banner/Paypal.jsx +++ b/src/components/banner/Paypal.jsx @@ -14,7 +14,7 @@ const Paypal = (props) => { const pixelLink="https://www.paypal.com/"+localeStringComplete+"/i/scr/pixel.gif"; return ( -
+
From 1af221d634c8b4f424940ccc5c5c5484c9e6154c Mon Sep 17 00:00:00 2001 From: Clement G Date: Sun, 19 Apr 2020 12:05:51 +0200 Subject: [PATCH 14/20] feat(language-select): Add german support --- src/components/layouts/LanguageSelector.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/layouts/LanguageSelector.jsx b/src/components/layouts/LanguageSelector.jsx index bd20d69..bdd5774 100644 --- a/src/components/layouts/LanguageSelector.jsx +++ b/src/components/layouts/LanguageSelector.jsx @@ -15,10 +15,11 @@ const LanguageSelector = () => { }; let locale=i18n.language.substring(0,2).toUpperCase() + console.log(locale); if(locale==="EN")locale="GB"; return ( Date: Sun, 19 Apr 2020 12:07:47 +0200 Subject: [PATCH 15/20] feat(language-select): remove console.log --- src/components/layouts/LanguageSelector.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/layouts/LanguageSelector.jsx b/src/components/layouts/LanguageSelector.jsx index bdd5774..c753b08 100644 --- a/src/components/layouts/LanguageSelector.jsx +++ b/src/components/layouts/LanguageSelector.jsx @@ -14,8 +14,7 @@ const LanguageSelector = () => { i18n.changeLanguage(locale); }; - let locale=i18n.language.substring(0,2).toUpperCase() - console.log(locale); + let locale=i18n.language.substring(0,2).toUpperCase(); if(locale==="EN")locale="GB"; return ( Date: Sun, 19 Apr 2020 12:41:15 +0200 Subject: [PATCH 16/20] feat(paypal): use custom button instead of PayPal code --- package.json | 1 + public/locale/i18n/de/resource.json | 4 +- public/locale/i18n/en/resource.json | 5 +- public/locale/i18n/es/resource.json | 4 +- public/locale/i18n/fr/resource.json | 4 +- src/components/banner/Paypal.jsx | 12 ++- src/components/layouts/Footer.jsx | 3 - yarn.lock | 153 +++------------------------- 8 files changed, 34 insertions(+), 152 deletions(-) diff --git a/package.json b/package.json index d188213..94ac1c7 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "@babel/core": "7.4.3", "@fortawesome/fontawesome-free": "^5.9.0", "@fortawesome/fontawesome-svg-core": "^1.2.19", + "@fortawesome/free-brands-svg-icons": "^5.13.0", "@fortawesome/free-solid-svg-icons": "^5.9.0", "@fortawesome/react-fontawesome": "^0.1.4", "@svgr/webpack": "4.1.0", diff --git a/public/locale/i18n/de/resource.json b/public/locale/i18n/de/resource.json index c2e6159..525a816 100644 --- a/public/locale/i18n/de/resource.json +++ b/public/locale/i18n/de/resource.json @@ -49,5 +49,7 @@ "Go back to homepage": "Zurück zur Hompage", "You have to judge every candidate/proposal!": "Sie müssen jeden Kandidaten/Abstimmungsvorschlag bewerten!", "Your participation was recorded with success!": " Ihre Teilnahme wurde gespeichert!", - "Thanks for your participation.": " Vielen Dank für Ihre Teilnahme." + "Thanks for your participation.": " Vielen Dank für Ihre Teilnahme.", + "Support us !" : "Unterstützen Sie uns!", + "PayPal - The safer, easier way to pay online!" : "PayPal - Die sicherere und einfachere Art, online zu bezahlen!" } diff --git a/public/locale/i18n/en/resource.json b/public/locale/i18n/en/resource.json index 4860c47..c80e6f4 100644 --- a/public/locale/i18n/en/resource.json +++ b/public/locale/i18n/en/resource.json @@ -77,5 +77,8 @@ "The election is over. You can't vote anymore": "The election is over. You can't vote anymore", "You need a token to vote in this election": "You need a token to vote in this election", "You seem to have already voted.": "You seem to have already voted.", - "The parameters of the election are incorrect.": "The parameters of the election are incorrect." + "The parameters of the election are incorrect.": "The parameters of the election are incorrect.", + "Support us !" : "Support us !", + "PayPal - The safer, easier way to pay online!" : "PayPal - The safer, easier way to pay online!" + } diff --git a/public/locale/i18n/es/resource.json b/public/locale/i18n/es/resource.json index 0d246ad..0295b61 100644 --- a/public/locale/i18n/es/resource.json +++ b/public/locale/i18n/es/resource.json @@ -77,5 +77,7 @@ "The election is over. You can't vote anymore": "__STRING_NOT_TRANSLATED__", "You need a token to vote in this election": "__STRING_NOT_TRANSLATED__", "You seem to have already voted.": "__STRING_NOT_TRANSLATED__", - "The parameters of the election are incorrect.": "__STRING_NOT_TRANSLATED__" + "The parameters of the election are incorrect.": "__STRING_NOT_TRANSLATED__", + "Support us !" : "¡Apóyanos!", + "PayPal - The safer, easier way to pay online!" : "PayPal - ¡La forma más segura y fácil de pagar en línea!" } diff --git a/public/locale/i18n/fr/resource.json b/public/locale/i18n/fr/resource.json index 2f7d8fc..a6af78c 100644 --- a/public/locale/i18n/fr/resource.json +++ b/public/locale/i18n/fr/resource.json @@ -77,5 +77,7 @@ "The election is over. You can't vote anymore": "L'élection est terminée. Vous ne pouvez plus voter.", "You need a token to vote in this election": "Vous avez besoin d'un jeton pour voter dans cette élection", "You seem to have already voted.": "Il semble que vous ayez déjà voté.", - "The parameters of the election are incorrect.": "Les paramètres de l'élection sont incorrects." + "The parameters of the election are incorrect.": "Les paramètres de l'élection sont incorrects.", + "Support us !" : "Soutenez-nous !", + "PayPal - The safer, easier way to pay online!" : "PayPal - Le moyen le plus sûr et le plus simple de payer en ligne !" } diff --git a/src/components/banner/Paypal.jsx b/src/components/banner/Paypal.jsx index a3468ef..77186c9 100644 --- a/src/components/banner/Paypal.jsx +++ b/src/components/banner/Paypal.jsx @@ -1,27 +1,29 @@ import React from 'react'; import i18n from '../../i18n' +import {withTranslation} from 'react-i18next'; +import { faPaypal } from "@fortawesome/free-brands-svg-icons"; +import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"; const Paypal = (props) => { + const {t} = props; let localeStringShort=i18n.language.substring(0,2); let localeStringComplete=localeStringShort.toLowerCase()+"_"+localeStringShort.toUpperCase(); if(localeStringComplete==="en_EN"){ localeStringComplete="en_US"; - localeStringShort="FR"; } - const imageLink="https://www.paypalobjects.com/"+localeStringComplete+"/"+localeStringShort.toUpperCase()+"/i/btn/btn_donateCC_LG.gif"; const pixelLink="https://www.paypal.com/"+localeStringComplete+"/i/scr/pixel.gif"; return ( -
+
+ -
); }; -export default Paypal; \ No newline at end of file +export default withTranslation()(Paypal); \ No newline at end of file diff --git a/src/components/layouts/Footer.jsx b/src/components/layouts/Footer.jsx index 5e0f679..17ce388 100644 --- a/src/components/layouts/Footer.jsx +++ b/src/components/layouts/Footer.jsx @@ -1,9 +1,6 @@ import React, { Component } from "react"; import {withTranslation} from 'react-i18next'; import { Link } from "react-router-dom"; - -import { FlagIcon } from '../flag' -import i18n from '../../i18n' import Paypal from "../banner/Paypal"; class Footer extends Component { diff --git a/yarn.lock b/yarn.lock index 587e2a1..78b7b7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -188,7 +188,7 @@ dependencies: "@babel/types" "^7.8.3" -"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.8.3": +"@babel/helper-module-imports@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498" integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg== @@ -918,7 +918,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.2", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.2", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7": version "7.9.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06" integrity sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q== @@ -976,83 +976,6 @@ resolved "https://registry.yarnpkg.com/@csstools/normalize.css/-/normalize.css-9.0.1.tgz#c27b391d8457d1e893f1eddeaf5e5412d12ffbb5" integrity sha512-6It2EVfGskxZCQhuykrfnALg7oVeiI6KclWSmGDqB0AiInVrTGB9Jp9i4/Ad21u9Jde/voVQz6eFX/eSg/UsPA== -"@emotion/cache@^10.0.27", "@emotion/cache@^10.0.9": - version "10.0.29" - resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.29.tgz#87e7e64f412c060102d589fe7c6dc042e6f9d1e0" - integrity sha512-fU2VtSVlHiF27empSbxi1O2JFdNWZO+2NFHfwO0pxgTep6Xa3uGb+3pVKfLww2l/IBGLNEZl5Xf/++A4wAYDYQ== - dependencies: - "@emotion/sheet" "0.9.4" - "@emotion/stylis" "0.8.5" - "@emotion/utils" "0.11.3" - "@emotion/weak-memoize" "0.2.5" - -"@emotion/core@^10.0.9": - version "10.0.28" - resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.28.tgz#bb65af7262a234593a9e952c041d0f1c9b9bef3d" - integrity sha512-pH8UueKYO5jgg0Iq+AmCLxBsvuGtvlmiDCOuv8fGNYn3cowFpLN98L8zO56U0H1PjDIyAlXymgL3Wu7u7v6hbA== - dependencies: - "@babel/runtime" "^7.5.5" - "@emotion/cache" "^10.0.27" - "@emotion/css" "^10.0.27" - "@emotion/serialize" "^0.11.15" - "@emotion/sheet" "0.9.4" - "@emotion/utils" "0.11.3" - -"@emotion/css@^10.0.27", "@emotion/css@^10.0.9": - version "10.0.27" - resolved "https://registry.yarnpkg.com/@emotion/css/-/css-10.0.27.tgz#3a7458198fbbebb53b01b2b87f64e5e21241e14c" - integrity sha512-6wZjsvYeBhyZQYNrGoR5yPMYbMBNEnanDrqmsqS1mzDm1cOTu12shvl2j4QHNS36UaTE0USIJawCH9C8oW34Zw== - dependencies: - "@emotion/serialize" "^0.11.15" - "@emotion/utils" "0.11.3" - babel-plugin-emotion "^10.0.27" - -"@emotion/hash@0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" - integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== - -"@emotion/memoize@0.7.4": - version "0.7.4" - resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" - integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== - -"@emotion/serialize@^0.11.15", "@emotion/serialize@^0.11.16": - version "0.11.16" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.16.tgz#dee05f9e96ad2fb25a5206b6d759b2d1ed3379ad" - integrity sha512-G3J4o8by0VRrO+PFeSc3js2myYNOXVJ3Ya+RGVxnshRYgsvErfAOglKAiy1Eo1vhzxqtUvjCyS5gtewzkmvSSg== - dependencies: - "@emotion/hash" "0.8.0" - "@emotion/memoize" "0.7.4" - "@emotion/unitless" "0.7.5" - "@emotion/utils" "0.11.3" - csstype "^2.5.7" - -"@emotion/sheet@0.9.4": - version "0.9.4" - resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.4.tgz#894374bea39ec30f489bbfc3438192b9774d32e5" - integrity sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA== - -"@emotion/stylis@0.8.5": - version "0.8.5" - resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" - integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== - -"@emotion/unitless@0.7.5": - version "0.7.5" - resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" - integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== - -"@emotion/utils@0.11.3": - version "0.11.3" - resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz#a759863867befa7e583400d322652a3f44820924" - integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw== - -"@emotion/weak-memoize@0.2.5": - version "0.2.5" - resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" - integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== - "@fortawesome/fontawesome-common-types@^0.2.28": version "0.2.28" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.28.tgz#1091bdfe63b3f139441e9cba27aa022bff97d8b2" @@ -1070,6 +993,13 @@ dependencies: "@fortawesome/fontawesome-common-types" "^0.2.28" +"@fortawesome/free-brands-svg-icons@^5.13.0": + version "5.13.0" + resolved "https://registry.yarnpkg.com/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-5.13.0.tgz#e79de73ba6555055204828dca9c0691e7ce5242b" + integrity sha512-/6xXiJFCMEQxqxXbL0FPJpwq5Cv6MRrjsbJEmH/t5vOvB4dILDpnY0f7zZSlA8+TG7jwlt12miF/yZpZkykucA== + dependencies: + "@fortawesome/fontawesome-common-types" "^0.2.28" + "@fortawesome/free-solid-svg-icons@^5.9.0": version "5.13.0" resolved "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.13.0.tgz#44d9118668ad96b4fd5c9434a43efc5903525739" @@ -2152,22 +2082,6 @@ babel-plugin-dynamic-import-node@^2.3.0: dependencies: object.assign "^4.1.0" -babel-plugin-emotion@^10.0.27: - version "10.0.33" - resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-10.0.33.tgz#ce1155dcd1783bbb9286051efee53f4e2be63e03" - integrity sha512-bxZbTTGz0AJQDHm8k6Rf3RQJ8tX2scsfsRyKVgAbiUPUNIRtlK+7JxP+TAd1kRLABFxe0CFm2VdK4ePkoA9FxQ== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@emotion/hash" "0.8.0" - "@emotion/memoize" "0.7.4" - "@emotion/serialize" "^0.11.16" - babel-plugin-macros "^2.0.0" - babel-plugin-syntax-jsx "^6.18.0" - convert-source-map "^1.5.0" - escape-string-regexp "^1.0.5" - find-root "^1.1.0" - source-map "^0.5.7" - babel-plugin-istanbul@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz#df4ade83d897a92df069c4d9a25cf2671293c854" @@ -2185,7 +2099,7 @@ babel-plugin-jest-hoist@^24.9.0: dependencies: "@types/babel__traverse" "^7.0.6" -babel-plugin-macros@2.8.0, babel-plugin-macros@^2.0.0: +babel-plugin-macros@2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== @@ -2199,11 +2113,6 @@ babel-plugin-named-asset-import@^0.3.2: resolved "https://registry.yarnpkg.com/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.6.tgz#c9750a1b38d85112c9e166bf3ef7c5dbc605f4be" integrity sha512-1aGDUfL1qOOIoqk9QKGIo2lANk+C7ko/fqH0uIyC71x3PEGz0uVP8ISgfEsFuG+FKmjHTvFK/nNM8dowpmUxLA== -babel-plugin-syntax-jsx@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" - integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= - babel-plugin-syntax-object-rest-spread@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" @@ -3437,11 +3346,6 @@ cssstyle@^1.0.0, cssstyle@^1.1.1: dependencies: cssom "0.3.x" -csstype@^2.5.7: - version "2.6.10" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.10.tgz#e63af50e66d7c266edb6b32909cfd0aabe03928b" - integrity sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w== - csstype@^2.6.7: version "2.6.9" resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.9.tgz#05141d0cd557a56b8891394c1911c40c8a98d098" @@ -4556,11 +4460,6 @@ find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-root@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" - integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== - find-up@3.0.0, find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -6937,11 +6836,6 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" -memoize-one@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" - integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== - memory-fs@^0.4.1, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" @@ -8794,7 +8688,7 @@ prop-types-exact@^1.2.0: object.assign "^4.1.0" reflect.ownkeys "^0.2.0" -prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -9049,13 +8943,6 @@ react-i18next@^11.3.4: "@babel/runtime" "^7.3.1" html-parse-stringify2 "2.0.1" -react-input-autosize@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.2.2.tgz#fcaa7020568ec206bc04be36f4eb68e647c4d8c2" - integrity sha512-jQJgYCA3S0j+cuOwzuCd1OjmBmnZLdqQdiLKRYrsMMzbjUrVDS5RvJUDwJqA7sKuksDuzFtm6hZGKFu7Mjk5aw== - dependencies: - prop-types "^15.5.8" - react-is@^16.12.0, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6, react-is@^16.9.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" @@ -9121,20 +9008,6 @@ react-router@5.1.2: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-select@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.1.0.tgz#ab098720b2e9fe275047c993f0d0caf5ded17c27" - integrity sha512-wBFVblBH1iuCBprtpyGtd1dGMadsG36W5/t2Aj8OE6WbByDg5jIFyT7X5gT+l0qmT5TqWhxX+VsKJvCEl2uL9g== - dependencies: - "@babel/runtime" "^7.4.4" - "@emotion/cache" "^10.0.9" - "@emotion/core" "^10.0.9" - "@emotion/css" "^10.0.9" - memoize-one "^5.0.0" - prop-types "^15.6.0" - react-input-autosize "^2.2.2" - react-transition-group "^4.3.0" - react-sortable-hoc@^1.9.1: version "1.11.0" resolved "https://registry.yarnpkg.com/react-sortable-hoc/-/react-sortable-hoc-1.11.0.tgz#fe4022362bbafc4b836f5104b9676608a40a278f" @@ -9174,7 +9047,7 @@ react-transition-group@^2.3.1: prop-types "^15.6.2" react-lifecycles-compat "^3.0.4" -react-transition-group@^4, react-transition-group@^4.3.0: +react-transition-group@^4: version "4.3.0" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.3.0.tgz#fea832e386cf8796c58b61874a3319704f5ce683" integrity sha512-1qRV1ZuVSdxPlPf4O8t7inxUGpdyO5zG9IoNfJxSO0ImU2A1YWkEQvFPuIPZmMLkg5hYs7vv5mMOyfgSkvAwvw== @@ -10065,7 +9938,7 @@ source-map@^0.4.2: dependencies: amdefine ">=0.0.4" -source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: +source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= From d80879f069681990ea797636ffb7c4df44775380 Mon Sep 17 00:00:00 2001 From: Clement G Date: Sun, 19 Apr 2020 13:00:16 +0200 Subject: [PATCH 17/20] feat(languageSelector): customize style #32 --- src/components/layouts/LanguageSelector.jsx | 5 ++--- src/scss/_app.scss | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/components/layouts/LanguageSelector.jsx b/src/components/layouts/LanguageSelector.jsx index c753b08..8661e6a 100644 --- a/src/components/layouts/LanguageSelector.jsx +++ b/src/components/layouts/LanguageSelector.jsx @@ -17,12 +17,11 @@ const LanguageSelector = () => { let locale=i18n.language.substring(0,2).toUpperCase(); if(locale==="EN")locale="GB"; return (); }; diff --git a/src/scss/_app.scss b/src/scss/_app.scss index f9cc227..ff7820a 100644 --- a/src/scss/_app.scss +++ b/src/scss/_app.scss @@ -310,3 +310,23 @@ li.sortable { .react-multi-email > span[data-placeholder] { padding: 0.25em !important; } + + +/** flag selector **/ +.flag-select > button { + height:35px; +} + +.flag-select__options{ + width:65px; + text-align:center; + background-color: $mv-light-color !important; +} + +.flag-select__options .flag-select__option{ + padding:0; + margin:0; +} +.flag-select__options .flag-select__option__icon{ + top:0; +} From 3811bcb6e5bc6e53544017e030dec3b8acfc6ba2 Mon Sep 17 00:00:00 2001 From: Clement G Date: Sun, 19 Apr 2020 13:16:01 +0200 Subject: [PATCH 18/20] feat(result): add number of vote #34 --- public/locale/i18n/de/resource.json | 5 +++-- public/locale/i18n/en/resource.json | 6 +++--- public/locale/i18n/es/resource.json | 5 +++-- public/locale/i18n/fr/resource.json | 5 +++-- src/components/layouts/Footer.jsx | 2 +- src/components/views/Result.jsx | 5 ++++- 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/public/locale/i18n/de/resource.json b/public/locale/i18n/de/resource.json index 525a816..2502ddb 100644 --- a/public/locale/i18n/de/resource.json +++ b/public/locale/i18n/de/resource.json @@ -1,7 +1,7 @@ { "Homepage": " Homepage ", "Source code": "Quellcode", - "Who are we": "Wer wir sind", + "Who are we?": "Wer wir sind?", "BetterVote": " BetterVote", "Voting platform": "Wahlplattform", "Majority Judgment": " Mehrheitswahl ", @@ -51,5 +51,6 @@ "Your participation was recorded with success!": " Ihre Teilnahme wurde gespeichert!", "Thanks for your participation.": " Vielen Dank für Ihre Teilnahme.", "Support us !" : "Unterstützen Sie uns!", - "PayPal - The safer, easier way to pay online!" : "PayPal - Die sicherere und einfachere Art, online zu bezahlen!" + "PayPal - The safer, easier way to pay online!" : "PayPal - Die sicherere und einfachere Art, online zu bezahlen!", + "Number of votes:" : "Anzahl der Stimmen:" } diff --git a/public/locale/i18n/en/resource.json b/public/locale/i18n/en/resource.json index c80e6f4..2bc1c4d 100644 --- a/public/locale/i18n/en/resource.json +++ b/public/locale/i18n/en/resource.json @@ -1,7 +1,7 @@ { "Homepage": "Homepage", "Source code": "Source code", - "Who are we": "Who are we", + "Who are we?": "Who are we?", "BetterVote": "BetterVote", "Voting platform": "Voting platform", "Majority Judgment": "Majority Judgment", @@ -79,6 +79,6 @@ "You seem to have already voted.": "You seem to have already voted.", "The parameters of the election are incorrect.": "The parameters of the election are incorrect.", "Support us !" : "Support us !", - "PayPal - The safer, easier way to pay online!" : "PayPal - The safer, easier way to pay online!" - + "PayPal - The safer, easier way to pay online!" : "PayPal - The safer, easier way to pay online!", + "Number of votes:" : "Number of votes:" } diff --git a/public/locale/i18n/es/resource.json b/public/locale/i18n/es/resource.json index 0295b61..5b06cfd 100644 --- a/public/locale/i18n/es/resource.json +++ b/public/locale/i18n/es/resource.json @@ -1,7 +1,7 @@ { "Homepage": "Página de inicio", "Source code": "Código fuente", - "Who are we": "Quiénes somos", + "Who are we?": "¿Quiénes somos?", "BetterVote": "VotarMejor", "Voting platform": "Plataforma de votación", "Majority Judgment": "Juicio Mayoritario", @@ -79,5 +79,6 @@ "You seem to have already voted.": "__STRING_NOT_TRANSLATED__", "The parameters of the election are incorrect.": "__STRING_NOT_TRANSLATED__", "Support us !" : "¡Apóyanos!", - "PayPal - The safer, easier way to pay online!" : "PayPal - ¡La forma más segura y fácil de pagar en línea!" + "PayPal - The safer, easier way to pay online!" : "PayPal - ¡La forma más segura y fácil de pagar en línea!", + "Number of votes:" : "Número de votos:" } diff --git a/public/locale/i18n/fr/resource.json b/public/locale/i18n/fr/resource.json index a6af78c..54d5578 100644 --- a/public/locale/i18n/fr/resource.json +++ b/public/locale/i18n/fr/resource.json @@ -1,7 +1,7 @@ { "Homepage": "Accueil", "Source code": "Code source", - "Who are we": "Qui sommes-nous", + "Who are we?": "Qui sommes-nous ?", "BetterVote": "MieuxVoter", "Voting platform": "Plateforme de vote", "Majority Judgment": "Jugement Majoritaire", @@ -79,5 +79,6 @@ "You seem to have already voted.": "Il semble que vous ayez déjà voté.", "The parameters of the election are incorrect.": "Les paramètres de l'élection sont incorrects.", "Support us !" : "Soutenez-nous !", - "PayPal - The safer, easier way to pay online!" : "PayPal - Le moyen le plus sûr et le plus simple de payer en ligne !" + "PayPal - The safer, easier way to pay online!" : "PayPal - Le moyen le plus sûr et le plus simple de payer en ligne !", + "Number of votes:" : "Nombre de votes :" } diff --git a/src/components/layouts/Footer.jsx b/src/components/layouts/Footer.jsx index 17ce388..671e2c3 100644 --- a/src/components/layouts/Footer.jsx +++ b/src/components/layouts/Footer.jsx @@ -22,7 +22,7 @@ class Footer extends Component { - {t("Source code")} - - {t("Who are we")} + {t("Who are we?")}
diff --git a/src/components/views/Result.jsx b/src/components/views/Result.jsx index 173b123..450ed9a 100644 --- a/src/components/views/Result.jsx +++ b/src/components/views/Result.jsx @@ -35,6 +35,7 @@ class Result extends Component { collapseProfiles: false, electionGrades: i18nGrades(), errorMessage: "", + numVotes:"..." }; } @@ -60,7 +61,7 @@ class Result extends Component { numVotes: c.num_votes })); console.log(response); - this.setState(state => ({ candidates: candidates })); + this.setState(state => ({ candidates: candidates, numVotes : candidates[0].numVotes })); return response; }; @@ -196,6 +197,8 @@ class Result extends Component {

{t("Results of the election:")}

+
{t("Number of votes:")}{" "+this.state.numVotes}
+
    {candidates.map((candidate, i) => { console.log(candidate); From 38c32e4e3c61415c888579b8dd3728f0f67e79d7 Mon Sep 17 00:00:00 2001 From: Clement G Date: Sun, 19 Apr 2020 13:21:11 +0200 Subject: [PATCH 19/20] feat(paypal): add color property (with class bootstrap) #31 --- src/components/banner/Paypal.jsx | 2 +- src/components/layouts/Footer.jsx | 2 +- src/components/views/VoteSuccess.jsx | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/banner/Paypal.jsx b/src/components/banner/Paypal.jsx index 77186c9..38b9945 100644 --- a/src/components/banner/Paypal.jsx +++ b/src/components/banner/Paypal.jsx @@ -18,7 +18,7 @@ const Paypal = (props) => { return (
    - + diff --git a/src/components/layouts/Footer.jsx b/src/components/layouts/Footer.jsx index 671e2c3..0cdfa2f 100644 --- a/src/components/layouts/Footer.jsx +++ b/src/components/layouts/Footer.jsx @@ -24,7 +24,7 @@ class Footer extends Component { - {t("Who are we?")}
    - +
    ); diff --git a/src/components/views/VoteSuccess.jsx b/src/components/views/VoteSuccess.jsx index f9f3bd9..857539d 100644 --- a/src/components/views/VoteSuccess.jsx +++ b/src/components/views/VoteSuccess.jsx @@ -5,6 +5,7 @@ import logoLine from "../../logos/logo-line-white.svg"; import { Link } from "react-router-dom"; import { AppContext } from "../../AppContext"; import Helloasso from "../banner/Helloasso"; +import Paypal from "../banner/Paypal"; class VoteSuccess extends Component { static contextType = AppContext; @@ -22,7 +23,7 @@ class VoteSuccess extends Component {

    {t("Your participation was recorded with success!")}

    {t("Thanks for your participation.")}

    - +
    From 47a0dbef4438af1eec5c8c28807064ef9b08e88e Mon Sep 17 00:00:00 2001 From: Clement G Date: Sun, 19 Apr 2020 14:07:02 +0200 Subject: [PATCH 20/20] feat(error): improve layout --- src/Errors.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Errors.js b/src/Errors.js index 2a92c08..a665df0 100644 --- a/src/Errors.js +++ b/src/Errors.js @@ -1,5 +1,8 @@ import React from "react"; import { Container, Row, Col } from "reactstrap"; +import { Link } from "react-router-dom"; +import logoLine from "./logos/logo-line-white.svg"; +import { withTranslation } from "react-i18next"; export const UNKNOWN_ELECTION_ERROR = "E1"; export const ONGOING_ELECTION_ERROR = "E2"; @@ -38,8 +41,20 @@ export const errorMessage = (error, t) => { export const Error = props => ( - -

    {props.value}

    + + logo + +
    + + +

    {props.value}

    + +
    + + + + Back to home page +