@@ -2,7 +2,6 @@ import React from 'react'
2
2
import {
3
3
majorScale ,
4
4
minorScale ,
5
- Link ,
6
5
Pane ,
7
6
Text ,
8
7
StatusIndicator
@@ -11,15 +10,16 @@ import {
11
10
import { initIPFS , initOrbitDB , getAllDatabases } from '../database'
12
11
import { actions , useStateValue } from '../state'
13
12
13
+ import ConnectToWalletButton from './ConnectToWalletButton'
14
+
14
15
function Systems ( ) {
15
16
const [ appState , dispatch ] = useStateValue ( )
16
17
17
-
18
18
React . useEffect ( ( ) => {
19
19
dispatch ( { type : actions . PROGRAMS . SET_PROGRAMS_LOADING , loading : true } )
20
20
21
21
initIPFS ( ) . then ( async ( ipfs ) => {
22
- dispatch ( { type : actions . SYSTEMS . SET_IPFS , ipfsStatus : 'Started' } )
22
+ dispatch ( { type : actions . SYSTEMS . SET_IPFS , ipfsStatus : 'Started' } )
23
23
24
24
initOrbitDB ( ipfs ) . then ( async ( databases ) => {
25
25
dispatch ( { type : actions . SYSTEMS . SET_ORBITDB , orbitdbStatus : 'Started' } )
@@ -32,38 +32,35 @@ function Systems () {
32
32
} , [ dispatch ] )
33
33
34
34
return (
35
-
36
35
< Pane background = 'white' elevation = { 1 } >
37
- < Pane
36
+ < Pane
38
37
display = 'flex'
39
- flexDirection = 'column '
38
+ flexDirection = 'row '
40
39
alignItems = 'left'
41
40
paddingX = { majorScale ( 6 ) }
42
41
paddingY = { majorScale ( 1 ) }
43
42
>
44
- < Link href = '#/' textDecoration = 'none' display = 'flex' flexDirection = 'row' >
45
- < Text fontWeight = '600' marginRight = { minorScale ( 1 ) } > Systems:</ Text >
46
- < Pane
47
- display = 'flex'
48
- alignItems = 'center'
49
- marginX = { minorScale ( 1 ) }
50
- >
51
- { appState . ipfsStatus === 'Started'
52
- ? < StatusIndicator color = "success" > IPFS</ StatusIndicator >
53
- : < StatusIndicator color = "warning" > IPFS</ StatusIndicator >
54
- }
55
- </ Pane >
56
- < Pane
43
+ < Pane display = 'flex' flexDirection = 'row' width = '100%' >
44
+ < Text
57
45
display = 'flex'
58
46
alignItems = 'center'
59
- marginX = { majorScale ( 1 ) }
47
+ fontWeight = '600'
48
+ marginRight = { minorScale ( 1 ) }
60
49
>
61
- { appState . orbitdbStatus === 'Started'
62
- ? < StatusIndicator color = "success" > OrbitDB</ StatusIndicator >
63
- : < StatusIndicator color = "warning" > OrbitDB</ StatusIndicator >
64
- }
65
- </ Pane >
66
- </ Link >
50
+ Systems:
51
+ </ Text >
52
+ {
53
+ appState . ipfsStatus === 'Started'
54
+ ? < StatusIndicator color = 'success' > IPFS</ StatusIndicator >
55
+ : < StatusIndicator color = 'warning' > IPFS</ StatusIndicator >
56
+ }
57
+ {
58
+ appState . orbitdbStatus === 'Started'
59
+ ? < StatusIndicator color = 'success' > OrbitDB</ StatusIndicator >
60
+ : < StatusIndicator color = 'warning' > OrbitDB</ StatusIndicator >
61
+ }
62
+ < ConnectToWalletButton style = { { marginLeft : 'auto' } } />
63
+ </ Pane >
67
64
</ Pane >
68
65
</ Pane >
69
66
)
0 commit comments