-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathwrapper.tsx
More file actions
28 lines (26 loc) · 829 Bytes
/
wrapper.tsx
File metadata and controls
28 lines (26 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import React from 'react'
import { DataBrowserContextData, DataBrowserContext } from './datasister-dashboard/context';
import { IndexedFormula, Fetcher, UpdateManager } from 'rdflib';
import { Dashboard } from './datasister-dashboard/Dashboard';
interface Props {
store: IndexedFormula,
fetcher: Fetcher,
updater: UpdateManager,
webId: string,
loadResource: (resourcePath: string) => void
}
export const Wrapper: React.FC<Props> = (props) => {
const dataBrowserContext: DataBrowserContextData = {
store: props.store,
fetcher: props.fetcher,
updater: props.updater,
webId: props.webId,
podOrigin: document.location.origin,
loadResource: props.loadResource
}
return (
<DataBrowserContext.Provider value={dataBrowserContext}>
<Dashboard/>
</DataBrowserContext.Provider>
)
}