File tree 1 file changed +3
-3
lines changed
src/components/_common/accordion
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ export const Accordion = ({ accordion }: AccordionProps) => {
26
26
27
27
useShortcuts ( { shortcut : Shortcuts . SEARCH , callback : expandAll } ) ;
28
28
29
- const openChangeHandler = ( isOpen : boolean , title : string , index : number ) => {
30
- if ( isOpen ) {
29
+ const openChangeHandler = ( isOpening : boolean , title : string , index : number ) => {
30
+ if ( isOpening ) {
31
31
setOpenAccordions ( [ ...openAccordions , index ] ) ;
32
32
} else {
33
33
setOpenAccordions ( openAccordions . filter ( ( i ) => i !== index ) ) ;
34
34
}
35
- logAmplitudeEvent ( isOpen ? AnalyticsEvents . ACC_COLLAPSE : AnalyticsEvents . ACC_EXPAND , {
35
+ logAmplitudeEvent ( isOpening ? AnalyticsEvents . ACC_EXPAND : AnalyticsEvents . ACC_COLLAPSE , {
36
36
tittel : title ,
37
37
opprinnelse : 'trekkspill' ,
38
38
} ) ;
You can’t perform that action at this time.
0 commit comments