@@ -4,18 +4,18 @@ import type { SearchResult } from "@elastic/search-ui"
4
4
import { FairDOSearchContext } from "@/components/FairDOSearchContext"
5
5
import { GlobalModalContext } from "@/components/GlobalModalContext"
6
6
import { ObjectRender } from "@/components/result/ObjectRender"
7
- import { PidDisplay } from "@/components/result/PidDisplay"
8
7
import { Badge } from "@/components/ui/badge"
9
8
import { Button } from "@/components/ui/button"
10
9
import { Dialog , DialogContent , DialogTrigger } from "@/components/ui/dialog"
11
10
import { DropdownMenu , DropdownMenuContent , DropdownMenuItem , DropdownMenuTrigger } from "@/components/ui/dropdown-menu"
12
11
import { BasicRelationNode } from "@/lib/RelationNode"
13
12
import { resultCache } from "@/lib/ResultCache"
14
- import { BookText , ChevronDown , File , GitFork , Globe , GraduationCap , ImageOff , LinkIcon , Microscope , Scale } from "lucide-react"
13
+ import { BookText , ChevronDown , GitFork , Globe , GraduationCap , ImageOff , LinkIcon , Microscope , Scale } from "lucide-react"
15
14
import { DateTime } from "luxon"
16
15
import { useCallback , useContext , useEffect , useMemo } from "react"
17
16
import { useStore } from "zustand"
18
17
import Image from "next/image"
18
+ import { tryURLPrettyPrint } from "@/lib/utils"
19
19
20
20
const HTTP_REGEX = / h t t p s ? : \/ \/ [ a - z ] + \. [ a - z ] + .* / gm
21
21
@@ -86,16 +86,18 @@ export function NMRResultView({ result, debug }: { result: SearchResult; debug?:
86
86
} , [ getField ] )
87
87
88
88
const hadPrimarySource = useMemo ( ( ) => {
89
- return getField ( "hadPrimarySource" )
89
+ const value = getField ( "hadPrimarySource" )
90
+ return tryURLPrettyPrint ( value )
90
91
} , [ getField ] )
91
92
92
93
const license = useMemo ( ( ) => {
93
- return getField ( "licenseURL" )
94
+ const value = getField ( "licenseURL" )
95
+ return tryURLPrettyPrint ( value )
94
96
} , [ getField ] )
95
97
96
- const fileType = useMemo ( ( ) => {
97
- return getField ( "digitalObjectType" )
98
- } , [ getField ] )
98
+ // const fileType = useMemo(() => {
99
+ // return getField("digitalObjectType")
100
+ // }, [getField])
99
101
100
102
const doLocation = useMemo ( ( ) => {
101
103
const value = getField ( "digitalObjectLocation" )
@@ -228,12 +230,12 @@ export function NMRResultView({ result, debug }: { result: SearchResult; debug?:
228
230
< Scale className = "mr-2 size-4 shrink-0" /> ️{ license }
229
231
</ span >
230
232
</ Badge >
231
- < Badge variant = "secondary" className = "truncate" >
232
- < span className = "flex truncate" >
233
- < File className = "mr-2 size-4 shrink-0" />
234
- < PidDisplay pid = { fileType } />
235
- </ span >
236
- </ Badge >
233
+ { /* <Badge variant="secondary" className="truncate">*/ }
234
+ { /* <span className="flex truncate">*/ }
235
+ { /* <File className="mr-2 size-4 shrink-0" />*/ }
236
+ { /* <PidDisplay pid={fileType} />*/ }
237
+ { /* </span>*/ }
238
+ { /* </Badge>*/ }
237
239
</ div >
238
240
< div className = "grow" > </ div >
239
241
< div className = "mt-8 flex flex-col flex-wrap justify-end gap-2 md:flex-row md:items-center md:gap-4" >
0 commit comments