fix: minor fix

pull/89/head
Pierre-Louis Guhur 1 year ago
parent 4045b4bbe5
commit 4ebdd59493

@ -1,6 +1,6 @@
import { useTranslation } from 'next-i18next'; import { useTranslation } from 'next-i18next';
import Image from 'next/image'; import Image from 'next/image';
import { Row, Col } from 'reactstrap'; import { Row, Col, Container } from 'reactstrap';
import ballotBox from '../public/urne.svg'; import ballotBox from '../public/urne.svg';
import email from '../public/email.svg'; import email from '../public/email.svg';
import respect from '../public/respect.svg'; import respect from '../public/respect.svg';
@ -28,20 +28,22 @@ const AdvantagesRow = () => {
}, },
]; ];
return ( return (
<Row> <Container>
{resources.map((item, i) => ( <Row>
<Col key={i} className="my-5 col-md-4 col-12"> {resources.map((item, i) => (
<Image <Col key={i} className="my-5 col-md-4 col-12">
src={item.src} <Image
alt={item.alt} src={item.src}
height="128" alt={item.alt}
className="d-block mx-auto" height="128"
/> className="d-block mx-auto"
<h4>{item.name}</h4> />
<p>{item.desc}</p> <h4>{item.name}</h4>
</Col> <p>{item.desc}</p>
))} </Col>
</Row> ))}
</Row>
</Container>
); );
}; };

@ -12,47 +12,49 @@ const Experiencediv = () => {
<div className="pt-5"> <div className="pt-5">
<div <div
className="w-100 justify-content-end d-flex d-md-none" className="w-100 justify-content-end d-flex d-md-none"
style={{ marginTop: '-150px' }} style={{ marginTop: '-200px' }}
> >
<Image src={vote} alt={t('home.alt-icon-ballot')} /> <Image src={vote} alt={t('home.alt-icon-ballot')} />
</div> </div>
<h3 className="text-center">{t('home.experience-name')}</h3> <Container>
<div className="d-flex"> <h3 className="text-center">{t('home.experience-name')}</h3>
<Row className="px-5 my-5 flex-fill justify-content-end align-items-center gap-lg-5 d-flex"> <div className="d-flex">
<Col className="col-12 col-lg-4"> <Row className="px-5 my-5 flex-fill justify-content-end align-items-center gap-lg-5 d-flex">
<h5 className="">{t('home.experience-1-name')}</h5> <Col className="col-12 col-lg-4">
<p>{t('home.experience-1-desc')}</p> <h5 className="">{t('home.experience-1-name')}</h5>
</Col> <p>{t('home.experience-1-desc')}</p>
<Col className="col-12 col-lg-4"> </Col>
<h5 className="">{t('home.experience-2-name')}</h5> <Col className="col-12 col-lg-4">
<p>{t('home.experience-2-desc')}</p> <h5 className="">{t('home.experience-2-name')}</h5>
<p></p> <p>{t('home.experience-2-desc')}</p>
</Col> <p></p>
</Row> </Col>
<Image </Row>
className="d-none d-md-flex justify-content-end" <Image
src={vote} className="d-none d-md-flex justify-content-end"
alt={t('home.alt-icon-ballot')} src={vote}
/> alt={t('home.alt-icon-ballot')}
</div> />
<div className="d-flex w-100 justify-content-center mt-5"> </div>
<a <div className="d-flex w-100 justify-content-center mt-5">
href={MAJORITY_JUDGMENT_LINK} <a
target="_blank" href={MAJORITY_JUDGMENT_LINK}
rel="noreferrer noopener" target="_blank"
> rel="noreferrer noopener"
<Button
color="primary py-3"
outline={false}
type="submit"
icon={faArrowRight}
position="right"
> >
{t('home.experience-call-to-action')} <Button
</Button> color="primary py-3"
</a> outline={false}
</div> type="submit"
icon={faArrowRight}
position="right"
>
{t('home.experience-call-to-action')}
</Button>
</a>
</div>
</Container>
</div> </div>
); );
}; };

@ -1,4 +1,5 @@
import Image from 'next/image'; import Image from 'next/image';
import Link from 'next/link';
import { useTranslation } from 'next-i18next'; import { useTranslation } from 'next-i18next';
import { getUrl, RouteTypes } from '@services/routes'; import { getUrl, RouteTypes } from '@services/routes';
import logoWithText from '../public/logos/logo.svg'; import logoWithText from '../public/logos/logo.svg';
@ -15,9 +16,9 @@ const Logo = ({ title = true, ...props }: LogoProps) => {
const router = useRouter(); const router = useRouter();
const src = title ? logoWithText : logo; const src = title ? logoWithText : logo;
return ( return (
<a href={getUrl(RouteTypes.HOME, router).toString()}> <Link href={getUrl(RouteTypes.HOME, router).toString()}>
<Image src={src} alt={t('logo.alt')} className="d-block" {...props} /> <Image src={src} alt={t('logo.alt')} className="d-block" {...props} />
</a> </Link>
); );
}; };

@ -48,6 +48,7 @@ const CandidateModal = ({ isOpen, position, toggle }) => {
return; return;
} }
if (names.includes(state.name)) { if (names.includes(state.name)) {
alert('foo');
dispatchApp({ dispatchApp({
type: AppTypes.TOAST_ADD, type: AppTypes.TOAST_ADD,
status: 'error', status: 'error',
@ -137,7 +138,7 @@ const CandidateModal = ({ isOpen, position, toggle }) => {
</div> </div>
</div> </div>
</div> </div>
<div className="mb-3"> <div className="my-3">
<Label className="fw-bold">{t('common.name')} </Label> <Label className="fw-bold">{t('common.name')} </Label>
<input <input
className="form-control" className="form-control"
@ -175,15 +176,19 @@ const CandidateModal = ({ isOpen, position, toggle }) => {
> >
{t('common.cancel')} {t('common.cancel')}
</Button> </Button>
<Button {
color={disabled ? 'light' : 'primary'} // Since we disabled the button, the onCLick is supported by another component
onClick={save} }
position="right" <div onClick={save}>
disabled={disabled} <Button
icon={faPlus} color={disabled ? 'light' : 'primary'}
> position="right"
{t('common.save')} disabled={disabled}
</Button> icon={faPlus}
>
{t('common.save')}
</Button>
</div>
</div> </div>
</Form> </Form>
</Col> </Col>

@ -12,6 +12,7 @@ function Application({ Component, pageProps }) {
typeof window !== 'undefined' && window.location.origin typeof window !== 'undefined' && window.location.origin
? window.location.origin ? window.location.origin
: 'http://localhost'; : 'http://localhost';
return ( return (
<> <>
<Head> <Head>

@ -157,7 +157,7 @@
"admin.confirm-question": "Question of your vote", "admin.confirm-question": "Question of your vote",
"admin.confirm-candidates": "Candidates", "admin.confirm-candidates": "Candidates",
"admin.confirm-submit": "Start the vote", "admin.confirm-submit": "Start the vote",
"admin.confirm-title": "Confirmer votre vote", "admin.confirm-title": "Check your vote is correct",
"admin.confirm-edit": "Save your modifications", "admin.confirm-edit": "Save your modifications",
"admin.success-election": "The vote has successfully been created!", "admin.success-election": "The vote has successfully been created!",
"admin.success-emails": "The voting link has been sent by emails to the participants.", "admin.success-emails": "The voting link has been sent by emails to the participants.",

Loading…
Cancel
Save