// Copyright 2017-2025 @pezkuwi/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { SessionInfo, Validator } from '../../types.js'; import type { UsePoints } from '../types.js'; import React, { useRef } from 'react'; import { Table } from '@pezkuwi/react-components'; import { useNextTick } from '@pezkuwi/react-hooks'; import { useTranslation } from '../../translate.js'; import Entry from './Entry.js'; interface Props { className?: string; legend: React.ReactNode; points?: UsePoints; sessionInfo: SessionInfo; toggleFavorite: (stashId: string) => void; validatorsActive?: Validator[]; } function Active ({ className = '', legend, points, sessionInfo, toggleFavorite, validatorsActive }: Props): React.ReactElement { const { t } = useTranslation(); const isNextTick = useNextTick(); const header = useRef<[string?, string?, number?][]>([ // favorite, badges, details, expand [t('validators'), 'start', 4] ]); return ( {isNextTick && validatorsActive?.map((v) => ( ))}
); } export default React.memo(Active);