Skip to content

Commit

Permalink
fix: use Enum instead of casting
Browse files Browse the repository at this point in the history
  • Loading branch information
toniocodo committed Sep 29, 2023
1 parent 4ccdc5c commit edc5929
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions libs/oeth/history/src/components/HistoryFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ import {
Typography,
useTheme,
} from '@mui/material';
import { HistoryType } from '@origin/oeth/shared';
import { isNilOrEmpty } from '@origin/shared/utils';
import { defineMessage, useIntl } from 'react-intl';

import { HistoryFilterButton } from './HistoryButton';

import type { HistoryType } from '@origin/oeth/shared';

const styles = {
fontSize: 12,
fontWeight: 500,
Expand All @@ -27,19 +26,19 @@ const styles = {
const filterOptions = [
{
label: defineMessage({ defaultMessage: 'Yield' }),
value: 'Yield' as HistoryType,
value: HistoryType.Yield,
},
{
label: defineMessage({ defaultMessage: 'Swap' }),
value: 'Swap' as HistoryType,
value: HistoryType.Swap,
},
{
label: defineMessage({ defaultMessage: 'Sent' }),
value: 'Sent' as HistoryType,
value: HistoryType.Sent,
},
{
label: defineMessage({ defaultMessage: 'Received' }),
value: 'Received' as HistoryType,
value: HistoryType.Received,
},
];

Expand Down

0 comments on commit edc5929

Please sign in to comment.