diff --git a/src/sider/oversikt/Oversikt.tsx b/src/sider/oversikt/Oversikt.tsx index 2134b3c2..30a2b0a8 100644 --- a/src/sider/oversikt/Oversikt.tsx +++ b/src/sider/oversikt/Oversikt.tsx @@ -72,7 +72,6 @@ export default function Oversikt({ return ( - + diff --git a/src/sider/oversikt/filter/ClearFiltersButton.tsx b/src/sider/oversikt/filter/ClearFiltersButton.tsx index 047750c6..be0f431d 100644 --- a/src/sider/oversikt/filter/ClearFiltersButton.tsx +++ b/src/sider/oversikt/filter/ClearFiltersButton.tsx @@ -3,6 +3,8 @@ import { useFilters } from '@/context/filters/FilterContext'; import { ActionType } from '@/context/filters/filterContextActions'; import { Button } from '@navikt/ds-react'; import { TrashIcon } from '@navikt/aksel-icons'; +import * as Amplitude from '@/utils/amplitude'; +import { EventType } from '@/utils/amplitude'; const texts = { nullstill: 'Nullstill valg', @@ -11,16 +13,27 @@ const texts = { export const ClearFiltersButton = (): ReactElement => { const { dispatch: dispatchFilterAction } = useFilters(); + function handleButtonClick() { + dispatchFilterAction({ + type: ActionType.ResetFilters, + }); + + Amplitude.logEvent({ + type: EventType.ButtonClick, + data: { + url: window.location.href, + tekst: 'Nullstill valg', + }, + }); + } + return (