Skip to content

Commit

Permalink
Update header and map components
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Nov 1, 2024
1 parent 2c35f28 commit 8c7f8e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const Header = () => {
</li>
<li className={styles.navItem}>
<Link href="/add-group" className={styles.link}>
Add group
Add a group
</Link>
</li>
</ul>
Expand Down
13 changes: 2 additions & 11 deletions src/components/Map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Link from 'next/link';
import { rubik } from '@/pages/_app';
import { Event } from '@/types/Event';
import { Group } from '@/types/Group';
import { ExternalIcon } from '../Icons/ExternalIcon';
import styles from './Map.module.scss';

type MapProps = {
Expand Down Expand Up @@ -60,7 +59,7 @@ const Map = ({ groups, selectedWeekday }: MapProps) => {
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
{events.map((event, index) => (
{events.map((event: Event, index) => (
<Marker
key={index}
position={[
Expand All @@ -70,21 +69,13 @@ const Map = ({ groups, selectedWeekday }: MapProps) => {
>
<Popup className={rubik.className}>
<p className={styles.popupTitle}>
<Link href={`/events/${event.slug}`}>
<Link href={`/groups/${event.slug}`}>
{event.name}
</Link>
</p>
<p className={styles.popupText}>
{event.location.address}
</p>
<a
className={styles.eventLink}
href={event.url}
target="_blank"
rel="noreferrer"
>
View group&apos;s website <ExternalIcon />
</a>
</Popup>
</Marker>
))}
Expand Down

0 comments on commit 8c7f8e7

Please sign in to comment.