bluejoyq

font add

...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
2 "devToolsPort": 19002, 2 "devToolsPort": 19002,
3 "expoServerPort": 19000, 3 "expoServerPort": 19000,
4 "packagerPort": 19001, 4 "packagerPort": 19001,
5 - "packagerPid": 30416, 5 + "packagerPid": 27784,
6 "expoServerNgrokUrl": "https://ru-c66.bluejoy.searchguide.exp.direct", 6 "expoServerNgrokUrl": "https://ru-c66.bluejoy.searchguide.exp.direct",
7 "packagerNgrokUrl": "https://packager.ru-c66.bluejoy.searchguide.exp.direct", 7 "packagerNgrokUrl": "https://packager.ru-c66.bluejoy.searchguide.exp.direct",
8 - "ngrokPid": 9812 8 + "ngrokPid": 16708
9 } 9 }
......
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 }
......
No preview for this file type