diff --git a/src/components/Overlay/OverlayTop/index.tsx b/src/components/Overlay/OverlayTop/index.tsx
index b931d34a4..6d398dbab 100644
--- a/src/components/Overlay/OverlayTop/index.tsx
+++ b/src/components/Overlay/OverlayTop/index.tsx
@@ -1,7 +1,7 @@
import React, { FC } from 'react';
import styled from 'styled-components';
import { isMobile } from 'react-device-detect';
-import { Link } from "react-router-dom";
+import { useHistory } from 'react-router';
import OverlayTitle from '../OverlayTitle/';
import OverlayEvent from '../OverlayEvent/';
@@ -49,6 +49,7 @@ const StyledWrapper = styled.div`
`;
const OverlayTop: FC = () => {
+ const history = useHistory();
const { closeOverlay } = useActions();
const { intro, eventNote, whatsNew } = content;
@@ -60,12 +61,12 @@ const OverlayTop: FC = () => {
{!isMobile && (
)}
{isMobile && ()}
{isMobile && }
diff --git a/src/components/Sidebar/SidebarEvents/index.tsx b/src/components/Sidebar/SidebarEvents/index.tsx
index 2db1ac73a..b12443533 100644
--- a/src/components/Sidebar/SidebarEvents/index.tsx
+++ b/src/components/Sidebar/SidebarEvents/index.tsx
@@ -1,4 +1,5 @@
import React, { FC } from 'react';
+import { useHistory } from 'react-router';
import SidebarTitle from '../SidebarTitle/';
import ExpandablePanel from '../../ExpandablePanel';
@@ -6,6 +7,8 @@ import SmallParagraph from '../../SmallParagraph';
import { useEventsGeoJson } from '../../../utils/hooks/useEventsGeoJson';
const SidebarEvents: FC = () => {
+ const history = useHistory();
+
const { isLoading: isLoadingEventsGeojson, data: eventsGeoJson } = useEventsGeoJson();
if (isLoadingEventsGeojson) {
return (Laden...
)
@@ -20,7 +23,7 @@ const SidebarEvents: FC = () => {
{new Date(feature.properties.date).toLocaleDateString()}{feature.properties.start ? ', ' + feature.properties.start : ''}{feature.properties.end ? ' - ' + feature.properties.end : ''}
{feature.properties.address ? feature.properties.address : ''}
- Zum Event
+ { history.push("/event/" + feature.properties.id)}}>Zum Event
))}
>