Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
new_excelso
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Prasetya Saputra
new_excelso
Commits
be7c32db
Commit
be7c32db
authored
May 13, 2020
by
Afid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pasang font
parent
c4230eab
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
15 deletions
+36
-15
App.js
App.js
+36
-15
Gotham-Bold-700.otf
assets/font/Gotham-Bold-700.otf
+0
-0
Gotham-BoldItalic-400.otf
assets/font/Gotham-BoldItalic-400.otf
+0
-0
Gotham_Bold_700.ttf
assets/font/Gotham_Bold_700.ttf
+0
-0
No files found.
App.js
View file @
be7c32db
...
@@ -11,15 +11,15 @@ import * as Localization from 'expo-localization';
...
@@ -11,15 +11,15 @@ import * as Localization from 'expo-localization';
import
i18n
from
'i18n-js'
;
import
i18n
from
'i18n-js'
;
import
en
from
'./lib/en'
;
import
en
from
'./lib/en'
;
import
id
from
'./lib/id'
;
import
id
from
'./lib/id'
;
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Text
,
View
}
from
'react-native'
;
import
{
Text
,
View
}
from
'react-native'
;
import
{
AppLoading
}
from
'expo'
;
import
{
AppLoading
}
from
'expo'
;
import
*
as
Font
from
'expo-font'
;
import
*
as
Font
from
'expo-font'
;
export
const
lang
=
i18n
.
translations
=
{
export
const
lang
=
i18n
.
translations
=
{
en
:
en
,
en
:
en
,
id
:
id
id
:
id
}
}
export
const
set_lang
=
i18n
.
locale
=
Localization
.
locale
;
export
const
set_lang
=
i18n
.
locale
=
Localization
.
locale
;
export
const
fallbacks
=
i18n
.
fallbacks
=
true
;
export
const
fallbacks
=
i18n
.
fallbacks
=
true
;
...
@@ -34,8 +34,28 @@ const store = createStore(persistReducers);
...
@@ -34,8 +34,28 @@ const store = createStore(persistReducers);
const
persistor
=
persistStore
(
store
)
const
persistor
=
persistStore
(
store
)
i18n
.
locale
=
Localization
.
locale
;
i18n
.
locale
=
Localization
.
locale
;
let
customFonts
=
{
'Gotham-Black'
:
require
(
'./assets/font/Gotham-Bold-700.otf'
),
'Gotham-SemiBoldItalic'
:
require
(
'./assets/font/Gotham-BoldItalic-400.otf'
)
};
export
default
function
App
()
{
export
default
function
App
()
{
const
[
fontsLoaded
,
setfontsLoaded
]
=
useState
(
false
)
const
loadFont
=
async
()
=>
{
await
Font
.
loadAsync
(
customFonts
);
};
useEffect
(()
=>
{
console
.
log
(
'===> Did Mount'
);
loadFont
().
then
(
_
=>
{
setfontsLoaded
(
true
);
})
},
[])
if
(
!
fontsLoaded
)
{
return
<
AppLoading
/>
;
}
else
{
return
(
return
(
<
Provider
store
=
{
store
}
>
<
Provider
store
=
{
store
}
>
<
PersistGate
loading
=
{
null
}
persistor
=
{
persistor
}
>
<
PersistGate
loading
=
{
null
}
persistor
=
{
persistor
}
>
...
@@ -45,4 +65,5 @@ export default function App() {
...
@@ -45,4 +65,5 @@ export default function App() {
<
/PersistGate
>
<
/PersistGate
>
<
/Provider
>
<
/Provider
>
);
);
}
}
}
assets/font/Gotham-Bold
700.otf
→
assets/font/Gotham-Bold
-
700.otf
View file @
be7c32db
File moved
assets/font/Gotham-BoldItalic
400.otf
→
assets/font/Gotham-BoldItalic
-
400.otf
View file @
be7c32db
File moved
assets/font/Gotham
Bold
700.ttf
→
assets/font/Gotham
_Bold_
700.ttf
View file @
be7c32db
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment