Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,31 @@
"project": "app",
"organization": "bcye"
}
],
[
"expo-font",
{
"fonts": [
"node_modules/@expo-google-fonts/fraunces/100Thin/Fraunces_100Thin.ttf",
"node_modules/@expo-google-fonts/fraunces/100Thin_Italic/Fraunces_100Thin_Italic.ttf",
"node_modules/@expo-google-fonts/fraunces/200ExtraLight/Fraunces_200ExtraLight.ttf",
"node_modules/@expo-google-fonts/fraunces/200ExtraLight_Italic/Fraunces_200ExtraLight_Italic.ttf",
"node_modules/@expo-google-fonts/fraunces/300Light/Fraunces_300Light.ttf",
"node_modules/@expo-google-fonts/fraunces/300Light_Italic/Fraunces_300Light_Italic.ttf",
"node_modules/@expo-google-fonts/fraunces/400Regular/Fraunces_400Regular.ttf",
"node_modules/@expo-google-fonts/fraunces/400Regular_Italic/Fraunces_400Regular_Italic.ttf",
"node_modules/@expo-google-fonts/fraunces/500Medium/Fraunces_500Medium.ttf",
"node_modules/@expo-google-fonts/fraunces/500Medium_Italic/Fraunces_500Medium_Italic.ttf",
"node_modules/@expo-google-fonts/fraunces/600SemiBold/Fraunces_600SemiBold.ttf",
"node_modules/@expo-google-fonts/fraunces/600SemiBold_Italic/Fraunces_600SemiBold_Italic.ttf",
"node_modules/@expo-google-fonts/fraunces/700Bold/Fraunces_700Bold.ttf",
"node_modules/@expo-google-fonts/fraunces/700Bold_Italic/Fraunces_700Bold_Italic.ttf",
"node_modules/@expo-google-fonts/fraunces/800ExtraBold/Fraunces_800ExtraBold.ttf",
"node_modules/@expo-google-fonts/fraunces/800ExtraBold_Italic/Fraunces_800ExtraBold_Italic.ttf",
"node_modules/@expo-google-fonts/fraunces/900Black/Fraunces_900Black.ttf",
"node_modules/@expo-google-fonts/fraunces/900Black_Italic/Fraunces_900Black_Italic.ttf"
]
}
]
],
"experiments": {
Expand Down
6 changes: 4 additions & 2 deletions app/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { Slot, Stack } from "expo-router";
import { hide, preventAutoHideAsync } from "expo-splash-screen";
import { useCallback, useEffect, useState } from "react";
import { Button, Text, View } from "react-native-ui-lib";
import { Button, Text, ThemeManager, View } from "react-native-ui-lib";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { Linking } from "react-native";
import { PRIMARY_COLOR } from "@/utils/theme";
import { initialiseTheme, PRIMARY_COLOR } from "@/utils/theme";
import { init as initSentry, wrap as wrapSentry } from "@sentry/react-native";

// See https://docs.expo.dev/versions/latest/sdk/splash-screen/#usage for explanation on how this works
preventAutoHideAsync();

initialiseTheme();

export default function Layout() {
const [privacyConsent, setPrivacyConsent] = useState<boolean | null>(null);

Expand Down
3 changes: 2 additions & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
"dependencies": {
"@bcye/structured-wikivoyage-types": "^0.2.3",
"@expo-google-fonts/fraunces": "^0.3.1",
"@expo/vector-icons": "^14.0.2",
"@gorhom/bottom-sheet": "^5.0.6",
"@maplibre/maplibre-react-native": "^10.1.0",
Expand All @@ -38,7 +39,7 @@
"expo": "~52.0.17",
"expo-blur": "~14.0.1",
"expo-constants": "~17.0.3",
"expo-font": "~13.0.1",
"expo-font": "~13.0.4",
"expo-haptics": "~14.0.0",
"expo-linking": "~7.0.3",
"expo-location": "~18.0.10",
Expand Down
10 changes: 9 additions & 1 deletion app/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions app/utils/theme.ts
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
import { ThemeManager } from "react-native-ui-lib";

export const PRIMARY_COLOR = "#388659";

export function initialiseTheme() {
ThemeManager.setComponentTheme("Text", (props: any) => ({
style: [{ fontFamily: "Fraunces" }, props.style],
}));
}