forked from MaastrichtU-IDS/perfect-graph
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
50 lines (46 loc) · 1.16 KB
/
App.tsx
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
41
42
43
44
45
46
47
48
49
50
import React from 'react'
import App from './_examples/CaseLawExplorerExample'
import {ThemeProvider, createTheme} from '@mui/material'
import {useMeasure, View} from 'colay-ui'
const theme = createTheme()
import cytoscape from 'cytoscape'
// @ts-ignore
import euler from 'cytoscape-euler'
// @ts-ignore
import cise from 'cytoscape-cise'
// @ts-ignore
import d3Force from 'cytoscape-d3-force'
// @ts-ignore
import cola from 'cytoscape-cola'
// @ts-ignore
import avsdf from 'cytoscape-avsdf'
// @ts-ignore
import dagre from 'cytoscape-dagre'
// @ts-ignore
import spread from 'cytoscape-spread'
// @ts-ignore
import klay from 'cytoscape-klay'
cytoscape.use(klay)
spread(cytoscape)
cytoscape.use(dagre)
cytoscape.use(avsdf)
cytoscape.use(euler)
cytoscape.use(cise)
cytoscape.use(cola)
cytoscape.use(d3Force)
export default () => {
const [containerRef, {width, height, initialized}] = useMeasure()
return (
<ThemeProvider theme={theme}>
<View
ref={containerRef}
style={{
width: '100%',
height: '100%'
}}
>
{initialized && <App dispatch={() => {}} {...{width, height}} />}
</View>
</ThemeProvider>
)
}