filenameCell.tsx 544 B

123456789101112131415161718
  1. import {WiderHovercard} from 'sentry/views/starfish/components/tableCells/spanDescriptionCell';
  2. import {OverflowEllipsisTextContainer} from 'sentry/views/starfish/components/textAlign';
  3. type Props = {
  4. url?: string;
  5. };
  6. function FilenameCell(props: Props) {
  7. const {url} = props;
  8. const filename = url?.split('/').pop()?.split('?')[0];
  9. return (
  10. <WiderHovercard position="right" body={filename}>
  11. <OverflowEllipsisTextContainer>{filename}</OverflowEllipsisTextContainer>
  12. </WiderHovercard>
  13. );
  14. }
  15. export default FilenameCell;