File tree 2 files changed +12
-5
lines changed
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,13 @@ import useSWRImmutable from "swr/immutable"
10
10
*/
11
11
export const PidDisplay = memo ( function PidDisplay ( { pid } : { pid : string } ) {
12
12
const resolveContent = useCallback ( async ( pid : string ) => {
13
+ // Hardcoded for NEP deployment, should be removed in the future if possible!
14
+ if ( pid === "21.T11981/935ad20c-e8f7-485d-8987-b4f22431ff4b" ) {
15
+ return "chemotion-repository.net"
16
+ } else if ( pid === "21.T11981/352621cf-b0c6-4105-89a4-324f16cf7776" ) {
17
+ return "nmrxiv.org"
18
+ }
19
+
13
20
if ( PidResolver . isPID ( pid ) ) {
14
21
const content = await pidResolver . resolve ( pid )
15
22
return content . name
Original file line number Diff line number Diff line change @@ -25,16 +25,16 @@ const demoConfig: FairDOConfig = {
25
25
apiKey : "UGNoTW1KUUJ3WmluUHBTcEVpalo6cGloOUVKZ0tTdnlMYVlpTzV4SXBrUQ==" ,
26
26
indices : [
27
27
{
28
- name : "fdo-test-9 " ,
28
+ name : "fdo-prod " ,
29
29
facets : [
30
30
{
31
31
key : "resourceType.keyword" ,
32
32
label : "Resource Type"
33
33
} ,
34
34
{
35
35
key : "hadPrimarySource.keyword" ,
36
- label : "Source"
37
- // usePidResolver: true
36
+ label : "Source" ,
37
+ usePidResolver : true
38
38
} ,
39
39
{
40
40
key : "NMR_Method.keyword" ,
@@ -119,7 +119,7 @@ const demoConfigWithCompound: FairDOConfig = {
119
119
apiKey : "UGNoTW1KUUJ3WmluUHBTcEVpalo6cGloOUVKZ0tTdnlMYVlpTzV4SXBrUQ==" ,
120
120
indices : [
121
121
{
122
- name : "fdo-test-5 " ,
122
+ name : "fdo-prod " ,
123
123
facets : [
124
124
{
125
125
key : "Compound.Molar_mass" ,
@@ -179,7 +179,7 @@ export const GenericResultRenderer: Story = {
179
179
{
180
180
icon : < GlobeIcon className = "rfs-shrink-0 rfs-size-4 rfs-mr-2" /> ,
181
181
field : "hadPrimarySource" ,
182
- // singleValueMapper: (v) => <PidDisplay pid={v} />,
182
+ singleValueMapper : ( v ) => < PidDisplay pid = { v } /> ,
183
183
label : "Source"
184
184
} ,
185
185
{
You can’t perform that action at this time.
0 commit comments