Skip to content

Commit caaaae1

Browse files
committed
feat: add link from cluster to gbif.org
1 parent 0bd69de commit caaaae1

File tree

1 file changed

+6
-3
lines changed
  • packages/react-components/src/entities/OccurrenceSidebar/details

1 file changed

+6
-3
lines changed

Diff for: packages/react-components/src/entities/OccurrenceSidebar/details/Cluster.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ import { jsx, css } from '@emotion/react';
33
import React, { useContext, useState, useEffect } from 'react';
44
import ThemeContext from '../../../style/themes/ThemeContext';
55
import * as styles from '../styles';
6-
import { Row, Col, Image, Properties, IconFeatures } from "../../../components";
6+
import { Row, Col, Image, Properties, IconFeatures, ResourceLink } from "../../../components";
77
import { useQuery } from '../../../dataManagement/api';
88
import { Header } from './Header';
99
import { prettifyEnum } from '../../../utils/labelMaker/config2labels';
10+
import env from '../../../../.env.json';
1011

1112
import { useUrlState } from '../../../dataManagement/state/useUrlState';
1213

@@ -67,6 +68,7 @@ export function Cluster({
6768

6869
export function RelatedOccurrence({ original, reasons, related, ...props }) {
6970
const theme = useContext(ThemeContext);
71+
7072
return <article css={styles.clusterCard({ theme })} {...props}>
7173
<Row wrap="nowrap" halfGutter={6} style={{ padding: 12 }}>
7274
<Col>
@@ -90,11 +92,12 @@ export function RelatedOccurrence({ original, reasons, related, ...props }) {
9092
issueCount={related.issues?.length}
9193
/>
9294
</div>
93-
<div>
94-
<Properties style={{ fontSize: 12 }} horizontal dense>
95+
<div style={{ fontSize: 12 }}>
96+
<Properties horizontal dense>
9597
<T>Publisher</T><V>{related.publisherTitle}</V>
9698
<T>Dataset</T><V>{related.datasetTitle}</V>
9799
</Properties>
100+
<a onClick={e => e.stopPropagation()} href={`${env.GBIF_ORG}/occurrence/${related.key}`}>View on GBIF.org</a>
98101
</div>
99102
</Col>
100103
<Col grow={false} shrink={false}>

0 commit comments

Comments
 (0)