Merge branch 'master' into 2018102169/searchGuide-design
# Conflicts: # searchGuide/.expo/packager-info.json
Showing
3 changed files
with
20 additions
and
6 deletions
1 | -import React from 'react'; | 1 | +import React, {useEffect, useState} from 'react'; |
2 | import Main from './components/Main/Main' | 2 | import Main from './components/Main/Main' |
3 | import { Provider,connect } from 'react-redux'; | 3 | import { Provider,connect } from 'react-redux'; |
4 | import Store from './reducers/Store'; | 4 | import Store from './reducers/Store'; |
5 | +import * as Font from 'expo-font'; | ||
5 | 6 | ||
6 | const App = () => { | 7 | const App = () => { |
7 | - return ( | 8 | + const [ fontLoaded,setFontLoaded ] = useState(false); |
8 | - <Provider store={Store}> | 9 | + useEffect( () => { |
9 | - <Main /> | 10 | + const fontLoading = async () => { |
10 | - </Provider> | 11 | + await Font.loadAsync({ |
11 | - ) | 12 | + 'CustomFont': require('./assets/font/NanumBarunGothic.ttf'), |
13 | + 'CustomFontBold': require('./assets/font/NanumBarunGothicBold.ttf') | ||
14 | + }); | ||
15 | + setFontLoaded(true); | ||
16 | + } | ||
17 | + fontLoading(); | ||
18 | + }, [] ) | ||
19 | + return ( | ||
20 | + <Provider store={Store}> | ||
21 | + { | ||
22 | + fontLoaded ? <Main /> : null | ||
23 | + } | ||
24 | + </Provider> | ||
25 | + ) | ||
12 | } | 26 | } |
13 | 27 | ||
14 | export default App; | 28 | export default App; |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
searchGuide/assets/font/NanumBarunGothic.ttf
0 → 100644
No preview for this file type
No preview for this file type
-
Please register or login to post a comment