-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathdashboardPane.tsx
More file actions
40 lines (34 loc) · 997 Bytes
/
dashboardPane.tsx
File metadata and controls
40 lines (34 loc) · 997 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
29
30
31
32
33
34
35
36
37
38
39
40
import React from 'react'
import ReactDOM from 'react-dom'
import UI from 'solid-ui'
import panes from 'pane-registry'
import { Wrapper } from './wrapper'
import { PaneDefinition } from '../types'
const HomePane: PaneDefinition = {
icon: UI.icons.iconBase + 'noun_547570.svg', // noun_25830
name: 'dashboard',
label: function () {
return 'Dashboard'
},
render: function (subject, dom) {
const container = document.createElement('div')
const loadResource = (resourcePath: string) => {
panes.getOutliner(dom).GotoSubject(resourcePath, true, undefined, true)
}
UI.authn.solidAuthClient.currentSession().then((session: any) => {
ReactDOM.render(
<Wrapper
store={UI.store}
fetcher={UI.store.fetcher}
updater={UI.store.updater}
webId={session.webId}
loadResource={loadResource}
/>,
container
)
})
return container
}
} // pane object
// ends
export default HomePane