Merge branch 'master' into 2018102169/searchGuide-design
# Conflicts: # searchGuide/.expo/packager-info.json
Showing
3 changed files
with
16 additions
and
2 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 = () => { |
| 8 | + const [ fontLoaded,setFontLoaded ] = useState(false); | ||
| 9 | + useEffect( () => { | ||
| 10 | + const fontLoading = async () => { | ||
| 11 | + await Font.loadAsync({ | ||
| 12 | + 'CustomFont': require('./assets/font/NanumBarunGothic.ttf'), | ||
| 13 | + 'CustomFontBold': require('./assets/font/NanumBarunGothicBold.ttf') | ||
| 14 | + }); | ||
| 15 | + setFontLoaded(true); | ||
| 16 | + } | ||
| 17 | + fontLoading(); | ||
| 18 | + }, [] ) | ||
| 7 | return ( | 19 | return ( |
| 8 | <Provider store={Store}> | 20 | <Provider store={Store}> |
| 9 | - <Main /> | 21 | + { |
| 22 | + fontLoaded ? <Main /> : null | ||
| 23 | + } | ||
| 10 | </Provider> | 24 | </Provider> |
| 11 | ) | 25 | ) |
| 12 | } | 26 | } | ... | ... |
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