Skip to content

Commit cd7ff64

Browse files
committed
Move to fdo-prod index
1 parent 1492c22 commit cd7ff64

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/components/result/PidDisplay.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ import useSWRImmutable from "swr/immutable"
1010
*/
1111
export const PidDisplay = memo(function PidDisplay({ pid }: { pid: string }) {
1212
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+
1320
if (PidResolver.isPID(pid)) {
1421
const content = await pidResolver.resolve(pid)
1522
return content.name

src/stories/FairDOElasticSearch.stories.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ const demoConfig: FairDOConfig = {
2525
apiKey: "UGNoTW1KUUJ3WmluUHBTcEVpalo6cGloOUVKZ0tTdnlMYVlpTzV4SXBrUQ==",
2626
indices: [
2727
{
28-
name: "fdo-test-9",
28+
name: "fdo-prod",
2929
facets: [
3030
{
3131
key: "resourceType.keyword",
3232
label: "Resource Type"
3333
},
3434
{
3535
key: "hadPrimarySource.keyword",
36-
label: "Source"
37-
// usePidResolver: true
36+
label: "Source",
37+
usePidResolver: true
3838
},
3939
{
4040
key: "NMR_Method.keyword",
@@ -119,7 +119,7 @@ const demoConfigWithCompound: FairDOConfig = {
119119
apiKey: "UGNoTW1KUUJ3WmluUHBTcEVpalo6cGloOUVKZ0tTdnlMYVlpTzV4SXBrUQ==",
120120
indices: [
121121
{
122-
name: "fdo-test-5",
122+
name: "fdo-prod",
123123
facets: [
124124
{
125125
key: "Compound.Molar_mass",
@@ -179,7 +179,7 @@ export const GenericResultRenderer: Story = {
179179
{
180180
icon: <GlobeIcon className="rfs-shrink-0 rfs-size-4 rfs-mr-2" />,
181181
field: "hadPrimarySource",
182-
// singleValueMapper: (v) => <PidDisplay pid={v} />,
182+
singleValueMapper: (v) => <PidDisplay pid={v} />,
183183
label: "Source"
184184
},
185185
{

0 commit comments

Comments
 (0)