File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -149,13 +149,21 @@ const CatalogueContent = () => {
149
149
) ;
150
150
151
151
const handleDownloadAll = useCallback ( async ( ) => {
152
+ if ( typeof window !== "undefined" && window . gtag ) {
153
+ window . gtag ( "event" , "download_all_clicked" , {
154
+ event_category : "Paper Downloads" ,
155
+ event_label : "Download All Clicked" ,
156
+ } ) ;
157
+ }
158
+
152
159
for ( const paper of selectedPapers ) {
153
160
const extension = paper . finalUrl . split ( "." ) . pop ( ) ;
154
161
const fileName = `${ extractBracketContent ( paper . subject ) } -${ paper . exam } -${ paper . slot } -${ paper . year } .${ extension } ` ;
155
162
await downloadFile ( paper . finalUrl , fileName ) ;
156
163
}
157
164
} , [ selectedPapers ] ) ;
158
165
166
+
159
167
const handleApplyFilters = useCallback (
160
168
(
161
169
exams : string [ ] ,
@@ -198,7 +206,7 @@ const CatalogueContent = () => {
198
206
const campusCondition = campus . length
199
207
? campus . includes ( paper . campus )
200
208
: true ;
201
- const answerkeyCondition = anskey ? paper . answerKeyIncluded === true : true ;
209
+ const answerkeyCondition = anskey ? paper . answerKeyIncluded === true : true ;
202
210
return (
203
211
examCondition &&
204
212
slotCondition &&
You can’t perform that action at this time.
0 commit comments