mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-10-30 14:49:14 +00:00
17 lines
480 B
TypeScript
17 lines
480 B
TypeScript
import TeamStore from 'sentry/stores/teamStore';
|
|
import {useLegacyStore} from 'sentry/stores/useLegacyStore';
|
|
|
|
import type {TeamBadgeProps} from './badge';
|
|
import Badge from './badge';
|
|
|
|
function TeamBadge(props: TeamBadgeProps) {
|
|
const {teams} = useLegacyStore(TeamStore);
|
|
|
|
// Get the most up-to-date team from the store
|
|
const teamFromStore = teams.find(t => t.id === props.team.id);
|
|
|
|
return <Badge {...props} team={teamFromStore ?? props.team} />;
|
|
}
|
|
|
|
export {TeamBadge};
|