Skip to content

Commit e596e42

Browse files
committed
chore: remove custom fonts
1 parent e8ee7f1 commit e596e42

File tree

5 files changed

+3
-38
lines changed

5 files changed

+3
-38
lines changed

examples/cookbook/app.json

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
"updates": {
1616
"fallbackToCacheTimeout": 0
1717
},
18-
"assetBundlePatterns": [
19-
"**/*"
20-
],
18+
"assetBundlePatterns": ["**/*"],
2119
"ios": {
2220
"supportsTablet": true
2321
},
@@ -30,17 +28,6 @@
3028
"web": {
3129
"favicon": "./assets/favicon.png"
3230
},
33-
"plugins": [
34-
"expo-router",
35-
[
36-
"expo-font",
37-
{
38-
"fonts": [
39-
"./assets/fonts/OpenSans-Regular.ttf",
40-
"./assets/fonts/OpenSans-Bold.ttf"
41-
]
42-
}
43-
]
44-
]
31+
"plugins": ["expo-router"]
4532
}
4633
}

examples/cookbook/app/index.tsx

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,11 @@
11
/* eslint-disable react-native-a11y/has-valid-accessibility-ignores-invert-colors */
2-
import React, { useEffect } from 'react';
2+
import React from 'react';
33
import { FlatList, Image, Pressable, StyleSheet, Text, View } from 'react-native';
4-
import { useFonts } from 'expo-font';
54
import { useRouter } from 'expo-router';
6-
import * as SplashScreen from 'expo-splash-screen';
75
import theme from '../theme';
86

9-
void SplashScreen.preventAutoHideAsync();
10-
117
export default function Home() {
128
const router = useRouter();
13-
const [loaded, error] = useFonts({
14-
'OpenSans-Bold': require('../assets/fonts/OpenSans-Bold.ttf'),
15-
'OpenSans-Regular': require('../assets/fonts/OpenSans-Regular.ttf'),
16-
});
17-
18-
useEffect(() => {
19-
if (loaded || error) {
20-
void SplashScreen.hideAsync();
21-
}
22-
}, [loaded, error]);
23-
24-
if (!loaded && !error) {
25-
return null;
26-
}
279

2810
const renderItem = ({ item }: { item: Recipe }) => (
2911
<Pressable role="listitem" style={styles.pressable} onPress={() => router.push(item.path)}>
@@ -68,12 +50,10 @@ const styles = StyleSheet.create({
6850
},
6951
title: {
7052
fontSize: 20,
71-
fontFamily: 'OpenSans-Bold',
7253
color: theme.colors.black,
7354
},
7455
subTitle: {
7556
fontSize: 14,
76-
fontFamily: 'OpenSans-Regular',
7757
color: theme.colors.gray,
7858
},
7959
banner: {
@@ -93,7 +73,6 @@ const styles = StyleSheet.create({
9373
pressableText: {
9474
color: '#fff',
9575
fontSize: 14,
96-
fontFamily: 'OpenSans-Bold',
9776
textAlign: 'center',
9877
},
9978
});
-128 KB
Binary file not shown.
Binary file not shown.

examples/cookbook/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"dependencies": {
1414
"expo": "^50.0.4",
1515
"expo-constants": "~15.4.6",
16-
"expo-font": "~11.10.3",
1716
"expo-linking": "~6.2.2",
1817
"expo-router": "~3.4.10",
1918
"expo-splash-screen": "~0.26.5",

0 commit comments

Comments
 (0)