File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 11import { FC } from 'react'
22import { useTranslation } from 'react-i18next'
33import { TableAgeType } from '../../../types/table-age-type'
4+ import { exhaustedTypeWarning } from '../../../types/errors'
45import { useLocalSettings } from '../../hooks/useLocalSettings'
56import { getTimeZone } from '../../hooks/useFormattedTimestamp'
67import { TableHeaderToggle } from '../TableHeaderToggle'
@@ -29,13 +30,15 @@ export const TableHeaderAge: FC<TableHeaderAgeProps> = ({ label }) => {
2930 )
3031 }
3132 case TableAgeType . Distance :
32- default :
3333 return (
3434 < TableHeaderToggle
3535 label = { label || t ( 'common.age' ) }
3636 onClick = { ( ) => changeSetting ( 'ageHeaderType' , TableAgeType . DateTime ) }
3737 tooltipTitle = { t ( 'table.headers.age.tooltipTitle' ) }
3838 />
3939 )
40+ default :
41+ exhaustedTypeWarning ( 'Unknown age header type' , ageHeaderType )
42+ return null
4043 }
4144}
Original file line number Diff line number Diff line change 11import { FC } from 'react'
22import { useTranslation } from 'react-i18next'
33import { NodeDisplayType } from '../../../types/node-display-type'
4+ import { exhaustedTypeWarning } from '../../../types/errors'
45import { useLocalSettings } from '../../hooks/useLocalSettings'
56import { TableHeaderToggle } from '../TableHeaderToggle'
67
@@ -22,13 +23,15 @@ export const TableHeaderNode: FC = () => {
2223 )
2324 }
2425 case NodeDisplayType . Id :
25- default :
2626 return (
2727 < TableHeaderToggle
2828 label = { t ( 'common.nodeId' ) }
2929 onClick = { ( ) => changeSetting ( 'nodeHeaderType' , NodeDisplayType . Address ) }
3030 tooltipTitle = { t ( 'rofl.nodeAddressSwitch' ) }
3131 />
3232 )
33+ default :
34+ exhaustedTypeWarning ( 'Unknown node display type' , nodeHeaderType )
35+ return null
3336 }
3437}
You can’t perform that action at this time.
0 commit comments