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

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

@ -1,4 +1,5 @@
import Image from 'next/image';
import Link from 'next/link';
import { useTranslation } from 'next-i18next';
import { getUrl, RouteTypes } from '@services/routes';
import logoWithText from '../public/logos/logo.svg';
@ -15,9 +16,9 @@ const Logo = ({ title = true, ...props }: LogoProps) => {
const router = useRouter();
const src = title ? logoWithText : logo;
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} />
</a>
</Link>
);
};

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

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

@ -157,7 +157,7 @@
"admin.confirm-question": "Question of your vote",
"admin.confirm-candidates": "Candidates",
"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.success-election": "The vote has successfully been created!",
"admin.success-emails": "The voting link has been sent by emails to the participants.",

Loading…
Cancel
Save