File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " freenit" ,
3
- "version" : " 0.1.1 " ,
3
+ "version" : " 0.1.2 " ,
4
4
"private" : false ,
5
5
"description" : " Freenit framework" ,
6
6
"author" : " Goran Mekić" ,
Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
- import { StoreProvider } from 'store-provider'
2
+ import { StoreProvider , store } from 'store-provider'
3
3
import { BrowserRouter as Router } from 'react-router-dom'
4
4
import { ThemeProvider } from '@material-ui/styles'
5
5
import { Style } from 'radium'
@@ -14,7 +14,7 @@ const App = () => {
14
14
< ThemeProvider theme = { theme } >
15
15
< Style rules = { styles } />
16
16
< Router >
17
- < StoreProvider >
17
+ < StoreProvider store = { store } >
18
18
< Routing />
19
19
</ StoreProvider >
20
20
</ Router >
Original file line number Diff line number Diff line change @@ -3,4 +3,5 @@ export * from './components'
3
3
export * from './pages'
4
4
export * from './utils'
5
5
export * from './store'
6
+ export * from './store-provider'
6
7
export * from './templates'
Original file line number Diff line number Diff line change @@ -7,11 +7,9 @@ import {
7
7
Resolution ,
8
8
Role ,
9
9
User ,
10
- } from 'pages'
11
- import {
12
- EmptyTemplate ,
13
- } from 'templates'
14
- import { Store } from 'store'
10
+ } from './pages'
11
+ import { Store } from './store'
12
+ import { EmptyTemplate } from './templates'
15
13
16
14
17
15
export const store = {
@@ -26,9 +24,9 @@ export const store = {
26
24
27
25
28
26
const Provider = ( props ) => {
29
- store . history = props . history
27
+ props . store . history = props . history
30
28
return (
31
- < Store . Provider value = { store } >
29
+ < Store . Provider value = { props . store } >
32
30
{ props . children }
33
31
</ Store . Provider >
34
32
)
Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
2
import { observer } from 'mobx-react'
3
3
4
+
4
5
export const Store = React . createContext ( { } )
5
6
6
7
You can’t perform that action at this time.
0 commit comments