/
githubmirror
/
ydb-embedded-ui
Обзор
Документация
Войти
/
githubmirror
/
ydb-embedded-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/components/TabletNameWrapper/TabletNameWrapper.tsx
28 строк
830 B
Hellen
feat: dynamic links for Clusters and Databases tables (#3877)
06 май 2026, 11:57
Не верифицирован
06 май 2026, 11:57
3b1185d
Код
Авторство
О чём код?
import {useTabletPagePath} from '../../routes'; import {cn} from '../../utils/cn'; import {EntityStatus} from '../EntityStatus/EntityStatus'; import './TabletNameWrapper.scss'; const b = cn('ydb-tablet-name-wrapper'); interface TabletNameWrapperProps { tabletId: string | number; followerId?: string | number; } export function TabletNameWrapper({tabletId, followerId}: TabletNameWrapperProps) { const getTabletPagePath = useTabletPagePath(); const tabletPath = getTabletPagePath(tabletId, {followerId: followerId?.toString()}); const tabletName = `${tabletId}${followerId ? `.${followerId}` : ''}`; return ( <EntityStatus name={tabletName} path={tabletPath} hasClipboardButton showStatus={false} className={b()} /> ); }