-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathVenueContent.tsx
More file actions
71 lines (68 loc) · 2.09 KB
/
Copy pathVenueContent.tsx
File metadata and controls
71 lines (68 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import type { Venue } from '@events-helsinki/components';
import {
useVenueTranslation,
Text,
ShareLinks,
} from '@events-helsinki/components';
import classNames from 'classnames';
import React from 'react';
import {
PageSection,
ContentContainer,
Link,
HtmlToReact,
} from 'react-helsinki-headless-cms';
import VenueHighlights from '../venueHighlights/VenueHighlights';
import VenueInfo from '../venueInfo/VenueInfo';
import VenueLocation from '../venueLocation/VenueLocation';
import VenueOtherInfo from '../venueOtherInfo/VenueOtherInfo';
import styles from './venueContent.module.scss';
interface Props {
venue: Venue;
className?: string;
}
const VenueContent: React.FC<Props> = ({ venue, className }) => {
const { t } = useVenueTranslation();
const { description } = venue;
const shortDescription = null;
return (
<PageSection className={classNames(styles.venueContent, className)}>
<ContentContainer>
<div className={styles.contentWrapper}>
<div className={styles.leftEmpty} />
<div>
<VenueHighlights venue={venue} />
<h2 className={styles.descriptionTitle}>
{t('venue:description.title')}
</h2>
{shortDescription && (
<Text variant="body-l" className={styles.description}>
{shortDescription}
</Text>
)}
{description && (
<div className={styles.description}>
<HtmlToReact
components={{
a: Link,
}}
>
{description}
</HtmlToReact>
</div>
)}
<VenueOtherInfo venue={venue} />
</div>
<aside className={styles.sidebar}>
<VenueInfo venue={venue} />
</aside>
<div className={styles.secondaryContent}>
<ShareLinks title={t('venue:shareLinks.title')} />
<VenueLocation venue={venue} />
</div>
</div>
</ContentContainer>
</PageSection>
);
};
export default VenueContent;