Skip to content

Commit d98a4ca

Browse files
committed
Remove ontobee parser for now
1 parent c40e6ef commit d98a4ca

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed
File renamed without changes.

src/components/search/DefaultFacet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function DefaultFacet(props: FacetViewProps & { config: FairDOConfigProvi
1212
const [search, setSearch] = useState("")
1313

1414
const selfConfig = useMemo(() => {
15-
return props.config.getFacetFields().find((f) => f.label === props.label)
15+
return props.config.getFacetFields().find((f) => f.label === props.label)!
1616
}, [props.config, props.label])
1717

1818
const onSearchDebounced = useRef(props.onSearch)

src/components/search/DefaultFacetOption.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import { Label } from "@/components/ui/label"
33
import { PidDisplay } from "@/components/result/PidDisplay"
44
import { FacetValue } from "@elastic/search-ui"
55
import { FairDOFacetConfig } from "@/config/FairDOConfig"
6-
import { useEffect, useMemo } from "react"
7-
import { ontobeeResolver } from "@/lib/OntobeeResolver"
6+
import { useMemo } from "react"
87

98
export function DefaultFacetOption({
109
option,
@@ -21,11 +20,12 @@ export function DefaultFacetOption({
2120
return option.value.toString()
2221
}, [option.value])
2322

24-
useEffect(() => {
25-
if (value.startsWith("http://purl.obolibrary.org")) {
26-
ontobeeResolver.parse(value)
27-
}
28-
}, [value])
23+
// TODO find a way to query obolibrary
24+
// useEffect(() => {
25+
// if (value.startsWith("http://purl.obolibrary.org")) {
26+
// ontobeeResolver.parse(value)
27+
// }
28+
// }, [value])
2929

3030
return (
3131
<div key={value} className="flex max-w-full items-center gap-2 break-words p-1 pb-2">

src/lib/OntobeeResolver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export class OntobeeResolver {
44
private client: ParsingClient
55

66
constructor() {
7-
this.client = new ParsingClient({ endpointUrl: "https://sparql.hegroup.org/sparql", fetch: (a, b) => fetch(a, { ...b, mode: "no-cors" }) })
7+
this.client = new ParsingClient({ endpointUrl: "https://sparql.hegroup.org/sparql" })
88
}
99

1010
async parse(url: string) {

0 commit comments

Comments
 (0)