Skip to content

Commit eaf981c

Browse files
CopilotTechQuery
andcommitted
Changes before error encountered
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
1 parent 486b611 commit eaf981c

File tree

5 files changed

+18556
-48
lines changed

5 files changed

+18556
-48
lines changed

components/Home/UpcomingEvents.tsx

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { observer } from 'mobx-react';
12
import Link from 'next/link';
23
import { FC, useContext } from 'react';
3-
import { Button, Card, Col, Container, Row } from 'react-bootstrap';
4+
import { Button, Card, Col, Row } from 'react-bootstrap';
45

56
import { I18nContext } from '../../models/Translation';
67
import { ArticleMeta } from '../../pages/api/core';
@@ -10,39 +11,37 @@ interface UpcomingEventsProps {
1011
events: ArticleMeta[];
1112
}
1213

13-
export const UpcomingEvents: FC<UpcomingEventsProps> = ({ events }) => {
14+
export const UpcomingEvents: FC<UpcomingEventsProps> = observer(({ events }) => {
1415
const { t } = useContext(I18nContext);
1516

1617
return (
17-
<div className="py-5 bg-white w-100 m-0">
18-
<Container>
19-
<SectionTitle>{t('upcoming_events')}</SectionTitle>
18+
<>
19+
<SectionTitle>{t('upcoming_events')}</SectionTitle>
2020

21-
<Row className="g-4" xs={1} sm={2} md={3}>
22-
{events.map(({ name, meta, path }) => (
23-
<Col key={name}>
24-
<Card body>
25-
<Card.Title className="text-dark">{name}</Card.Title>
26-
<Card.Text className="text-dark">
27-
{t('activity_time')}: {meta?.start || 'N/A'}
28-
</Card.Text>
29-
<Card.Text className="text-dark">
30-
{t('activity_location')}: {meta?.address || 'N/A'}
31-
</Card.Text>
21+
<Row className="g-4" xs={1} sm={2} md={3}>
22+
{events.map(({ name, meta, path }) => (
23+
<Col key={name}>
24+
<Card body>
25+
<Card.Title className="text-dark">{name}</Card.Title>
26+
<Card.Text className="text-dark">
27+
{t('activity_time')}: {meta?.start || 'N/A'}
28+
</Card.Text>
29+
<Card.Text className="text-dark">
30+
{t('activity_location')}: {meta?.address || 'N/A'}
31+
</Card.Text>
3232

33-
<Link href={path || '#'} className="btn btn-primary">
34-
{t('view_details')}
35-
</Link>
36-
</Card>
37-
</Col>
38-
))}
39-
</Row>
40-
<div className="text-center mt-4">
41-
<Button variant="outline-primary" size="lg" href="/activity">
42-
{t('view_all_activities')}
43-
</Button>
44-
</div>
45-
</Container>
46-
</div>
33+
<Link href={path || '#'} className="btn btn-primary">
34+
{t('view_details')}
35+
</Link>
36+
</Card>
37+
</Col>
38+
))}
39+
</Row>
40+
<div className="text-center mt-4">
41+
<Button variant="outline-primary" size="lg" href="/activity">
42+
{t('view_all_activities')}
43+
</Button>
44+
</div>
45+
</>
4746
);
48-
};
47+
});

next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference path="./.next/types/routes.d.ts" />
34

45
// NOTE: This file should not be edited
56
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.

0 commit comments

Comments
 (0)