Skip to content

Commit 6fea37f

Browse files
chore(stablecoin-accordion): use mapped type for button content
1 parent f4c97ac commit 6fea37f

File tree

1 file changed

+11
-12
lines changed
  • src/components/StablecoinAccordion

1 file changed

+11
-12
lines changed

src/components/StablecoinAccordion/utils.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@ import { TranslationKey } from "../../utils/translations"
22

33
export type CategoryNameType = "dapps" | "buy" | "earn" | "generate"
44

5-
type AccordionButtonContentType = Record<
6-
CategoryNameType,
7-
{
8-
emoji: string
9-
title: TranslationKey
10-
pill?: {
11-
color: string
12-
name: TranslationKey
13-
}
14-
textPreview: TranslationKey
5+
type AccordionButtonContentType = {
6+
emoji: string
7+
title: TranslationKey
8+
pill?: {
9+
color: string
10+
name: TranslationKey
1511
}
16-
>
12+
textPreview: TranslationKey
13+
}
1714

18-
export const accordionButtonContent: AccordionButtonContentType = {
15+
export const accordionButtonContent: {
16+
[key in CategoryNameType]: AccordionButtonContentType
17+
} = {
1918
dapps: {
2019
emoji: ":twisted_rightwards_arrows:",
2120
title: "page-stablecoins-accordion-swap-title",

0 commit comments

Comments
 (0)