From a31a52ff8553a640c597091ddc089d73682f6c97 Mon Sep 17 00:00:00 2001 From: Luighi Date: Tue, 25 May 2021 22:13:19 -0500 Subject: [PATCH 1/3] Update link for new PL plan --- components/PresidentialList/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/components/PresidentialList/index.js b/components/PresidentialList/index.js index 119d658..d917383 100644 --- a/components/PresidentialList/index.js +++ b/components/PresidentialList/index.js @@ -47,6 +47,22 @@ export default function presidentList(props) { } const presidentList = data?.data; + const NewPlan = () => { + if (presidentList.president.org_politica_alias === 'Perú Libre') + return ( + + + + Ir al nuevo plan de gobierno + + + ); + return null; + }; + return ( @@ -65,6 +81,7 @@ export default function presidentList(props) { {presidentList.president.org_politica_alias} + Date: Tue, 25 May 2021 23:04:14 -0500 Subject: [PATCH 2/3] Fix style for if-body Co-authored-by: Juan --- components/PresidentialList/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/PresidentialList/index.js b/components/PresidentialList/index.js index d917383..625987e 100644 --- a/components/PresidentialList/index.js +++ b/components/PresidentialList/index.js @@ -48,7 +48,7 @@ export default function presidentList(props) { const presidentList = data?.data; const NewPlan = () => { - if (presidentList.president.org_politica_alias === 'Perú Libre') + if (presidentList.president.org_politica_alias === 'Perú Libre') { return ( ); + } return null; }; From d2ab6ccea35793aae72e138392e49876a9b52c13 Mon Sep 17 00:00:00 2001 From: Luighi Date: Thu, 27 May 2021 00:05:25 -0500 Subject: [PATCH 3/3] Update styles in links --- components/PresidentialList/index.js | 15 +++++++++++---- components/PresidentialList/styles.js | 10 ++++++++-- public/images/icons/follow-icon.svg | 1 + 3 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 public/images/icons/follow-icon.svg diff --git a/components/PresidentialList/index.js b/components/PresidentialList/index.js index 625987e..0283dc2 100644 --- a/components/PresidentialList/index.js +++ b/components/PresidentialList/index.js @@ -1,12 +1,12 @@ import * as Styled from './styles'; import useSWR from 'swr'; import fetch from 'isomorphic-fetch'; +import Image from 'next/image'; import toggleSlug from 'components/PartyCard/toggleSlug'; import Router, { useRouter } from 'next/router'; import Loading from 'components/Loading'; import GoBackButton from 'components/GoBackButton'; import comesFromAFinishedPresidentialUserTrip from './comesFromAFinishedPresidentialUserTrip'; -import ExternalLinkIcon from 'public/images/icons/external-link.svg'; const LoadingScreen = () => { return ( @@ -47,6 +47,13 @@ export default function presidentList(props) { } const presidentList = data?.data; + const FollowIcon = () => { + return ( + + + + ); + }; const NewPlan = () => { if (presidentList.president.org_politica_alias === 'Perú Libre') { return ( @@ -54,13 +61,13 @@ export default function presidentList(props) { href={'https://perulibre.pe/plan-bicentenario.pdf'} target="_blank" rel="noopener noreferrer"> - Ir al nuevo plan de gobierno + ); - } + } return null; }; @@ -87,10 +94,10 @@ export default function presidentList(props) { href={presidentList.president.plan_de_gobierno_url || '#'} target="_blank" rel="noopener noreferrer"> - Ir al plan de gobierno + diff --git a/components/PresidentialList/styles.js b/components/PresidentialList/styles.js index c18e294..3ec5d0c 100644 --- a/components/PresidentialList/styles.js +++ b/components/PresidentialList/styles.js @@ -33,22 +33,28 @@ export const Title = styled(BaseTitle)` export const EmphasizedTitle = styled(Title)` color: #5bc13e; + margin-bottom: 0.5rem; margin-top: 0; `; export const ExternalLink = styled('a')` align-items: center; - align-self: flex-start; + align-self: center; color: #5bc13e; display: flex; font-size: 0.875rem; - margin-top: 1rem; + margin-top: 0.5rem; + padding: 0.5625rem 0; `; export const ExternalLinkText = styled('span')` font-size: 0.875rem; margin-left: 0.5rem; `; +export const FollowIcon = styled.div` + margin-left: 0.625rem; +`; + export const Subtitle = styled('p')` color: #475065; font-family: Poppins; diff --git a/public/images/icons/follow-icon.svg b/public/images/icons/follow-icon.svg new file mode 100644 index 0000000..771be2a --- /dev/null +++ b/public/images/icons/follow-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file