Skip to content

Commit

Permalink
Logging av Accordion var invertert
Browse files Browse the repository at this point in the history
  • Loading branch information
PerOlavM committed Aug 26, 2024
1 parent 39fda1c commit 6fc47ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/_common/accordion/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ export const Accordion = ({ accordion }: AccordionProps) => {

useShortcuts({ shortcut: Shortcuts.SEARCH, callback: expandAll });

const openChangeHandler = (isOpen: boolean, title: string, index: number) => {
if (isOpen) {
const openChangeHandler = (isOpening: boolean, title: string, index: number) => {
if (isOpening) {
setOpenAccordions([...openAccordions, index]);
} else {
setOpenAccordions(openAccordions.filter((i) => i !== index));
}
logAmplitudeEvent(isOpen ? AnalyticsEvents.ACC_COLLAPSE : AnalyticsEvents.ACC_EXPAND, {
logAmplitudeEvent(isOpening ? AnalyticsEvents.ACC_EXPAND : AnalyticsEvents.ACC_COLLAPSE, {
tittel: title,
opprinnelse: 'trekkspill',
});
Expand Down

0 comments on commit 6fc47ae

Please sign in to comment.