diff --git a/app/components/EventListItem.tsx b/app/components/EventListItem.tsx index 12c91ffda..96a3474ec 100644 --- a/app/components/EventListItem.tsx +++ b/app/components/EventListItem.tsx @@ -8,6 +8,7 @@ import { } from "outline-icons"; import * as React from "react"; import { useTranslation } from "react-i18next"; +import { useLocation } from "react-router-dom"; import styled from "styled-components"; import Document from "~/models/Document"; import Event from "~/models/Event"; @@ -27,6 +28,7 @@ type Props = { const EventListItem = ({ event, latest, document }: Props) => { const { t } = useTranslation(); const { policies } = useStores(); + const location = useLocation(); const can = policies.abilities(document.id); const opts = { userName: event.actor.name, @@ -86,6 +88,8 @@ const EventListItem = ({ event, latest, document }: Props) => { return null; } + const isActive = location.pathname === to; + return ( { title={