File tree Expand file tree Collapse file tree
app/components/Views/Homepage/Sections/WhatsHappening Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import { SectionRefreshHandle } from '../../types';
1616import { selectWhatsHappeningEnabled } from '../../../../../selectors/featureFlagController/whatsHappening' ;
1717import { strings } from '../../../../../../locales/i18n' ;
1818import Routes from '../../../../../constants/navigation/Routes' ;
19- import { MAX_ITEMS_DISPLAYED , WhatsHappeningEntryPoint } from './constants' ;
19+ import { MAX_ITEMS_DISPLAYED , WhatsHappeningEntryPoint } from './constants' ;
2020import { useWhatsHappening } from './hooks' ;
2121import { WhatsHappeningCard , WhatsHappeningCardSkeleton } from './components' ;
2222import useHomeViewedEvent , {
Original file line number Diff line number Diff line change @@ -6,14 +6,18 @@ import type { WhatsHappeningItem } from './types';
66 *
77 * Optional fields (`category`, `impact`) are stripped when undefined so
88 * the resulting payload only includes keys that have a real value.
9+ *
10+ * The shape is widened with `Record<string, unknown>` so the result can be
11+ * passed directly to `AnalyticsEventBuilder.addProperties`, which expects
12+ * an index-signature-compatible bag.
913 */
10- export interface WhatsHappeningEventProps {
14+ export type WhatsHappeningEventProps = {
1115 event_id : string ;
1216 card_index : number ;
1317 category ?: WhatsHappeningItem [ 'category' ] ;
1418 impact ?: WhatsHappeningItem [ 'impact' ] ;
1519 asset_symbols : string [ ] ;
16- }
20+ } & Record < string , unknown > ;
1721
1822export const getWhatsHappeningEventProps = (
1923 item : WhatsHappeningItem ,
You can’t perform that action at this time.
0 commit comments