(cherry picked from commit e04f84fd1b)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
This commit is contained in:
co-authored by
Gilles De Mey
parent
326c48347e
commit
8c91d4e6e2
@@ -34,15 +34,22 @@ export const AnnotationDetailsField: FC<Props> = ({ annotationKey, value }) => {
|
||||
|
||||
const AnnotationValue: FC<Props> = ({ annotationKey, value }) => {
|
||||
const styles = useStyles(getStyles);
|
||||
if (wellableAnnotationKeys.includes(annotationKey)) {
|
||||
return <Well>{value}</Well>;
|
||||
} else if (value && value.startsWith('http')) {
|
||||
|
||||
const needsWell = wellableAnnotationKeys.includes(annotationKey);
|
||||
const needsLink = value && value.startsWith('http');
|
||||
|
||||
if (needsWell) {
|
||||
return <Well className={styles.well}>{value}</Well>;
|
||||
}
|
||||
|
||||
if (needsLink) {
|
||||
return (
|
||||
<a href={value} target="__blank" className={styles.link}>
|
||||
{value}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
return <>{value}</>;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user