diff --git a/packages/ui/app.config.js b/packages/ui/app.config.js index d33acdc92..ad9484a28 100644 --- a/packages/ui/app.config.js +++ b/packages/ui/app.config.js @@ -7,11 +7,11 @@ export default ({ config }) => ({ }, version: '1.0.0', orientation: 'portrait', - icon: './src/assets-native/icon.png', + icon: './src/assets-native/images/icon.png', scheme: 'myapp', userInterfaceStyle: 'automatic', splash: { - image: './src/assets-native/splash.png', + image: './src/assets-native/images/splash.png', resizeMode: 'contain', backgroundColor: '#ffffff', }, @@ -26,13 +26,13 @@ export default ({ config }) => ({ }, android: { adaptiveIcon: { - foregroundImage: './src/assets-native/adaptive-icon.png', + foregroundImage: './src/assets-native/images/adaptive-icon.png', backgroundColor: '#ffffff', }, package: 'io.leather.mobilewallet', }, web: { - favicon: './src/assets-native/favicon.png', + favicon: './src/assets-native/images/favicon.png', }, plugins: ['expo-font'], }); diff --git a/packages/ui/app.json b/packages/ui/app.json deleted file mode 100644 index ca845fcc3..000000000 --- a/packages/ui/app.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "expo": { - "name": "@leather.io/ui", - "slug": "leather-wallet_ui", - "version": "1.0.0", - "orientation": "portrait", - "icon": "./src/assets-native/icon.png", - "scheme": "myapp", - "userInterfaceStyle": "automatic", - "splash": { - "image": "./src/assets-native/splash.png", - "resizeMode": "contain", - "backgroundColor": "#ffffff" - }, - "updates": { - "fallbackToCacheTimeout": 0 - }, - "assetBundlePatterns": ["**/*"], - "ios": { - "supportsTablet": true, - "bundleIdentifier": "io.leather.mobilewallet", - "buildNumber": "1.0.0" - }, - "android": { - "adaptiveIcon": { - "foregroundImage": "./src/assets-native/adaptive-icon.png", - "backgroundColor": "#ffffff" - }, - "package": "io.leather.mobilewallet" - }, - "web": { - "favicon": "./src/assets-native/favicon.png" - }, - "plugins": [ - [ - "expo-font", - { - "fonts": [ - "./src/assets-native/fonts/FiraCode-Retina.otf", - "./src/assets-native/fonts/FiraCode-Medium.otf", - "./src/assets-native/fonts/ABCDiatype-Regular.otf", - "./src/assets-native/fonts/ABCDiatype-Light.otf", - "./src/assets-native/fonts/ABCDiatype-Medium.otf", - "./src/assets-native/fonts/MarchePro-Super.otf" - ] - } - ] - ] - } -} diff --git a/packages/ui/package.json b/packages/ui/package.json index 69fd46d96..dc8bd9230 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -59,6 +59,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.74.1", + "react-native-gesture-handler": "2.16.1", "react-native-reanimated": "3.10.1", "react-native-safe-area-context": "4.10.1", "react-native-svg": "15.2.0", diff --git a/packages/ui/src/app.tsx b/packages/ui/src/app.tsx index 80a1dd82a..e38fe9787 100644 --- a/packages/ui/src/app.tsx +++ b/packages/ui/src/app.tsx @@ -1,12 +1,25 @@ import { useColorScheme } from 'react-native'; import { ThemeProvider } from '@shopify/restyle'; +import { useFonts } from 'expo-font'; import StorybookUIRoot from './.storybook-native'; import { generateTheme } from './theme-native'; function RootLayout() { const colorScheme = useColorScheme(); + const [loaded, error] = useFonts({ + 'FiraCode-Retina': require('./assets-native/fonts/FiraCode-Retina.otf'), + 'FiraCode-Medium': require('./assets-native/fonts/FiraCode-Medium.otf'), + 'ABCDiatype-Light': require('./assets-native/fonts/ABCDiatype-Light.otf'), + 'ABCDiatype-Regular': require('./assets-native/fonts/ABCDiatype-Regular.otf'), + 'ABCDiatype-Medium': require('./assets-native/fonts/ABCDiatype-Medium.otf'), + 'MarchePro-Super': require('./assets-native/fonts/MarchePro-Super.otf'), + }); + + if (!loaded || error) { + return null; + } return ( diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c6332cf6b..6e4858784 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1021,6 +1021,9 @@ importers: react-native: specifier: 0.74.1 version: 0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.25.8(@babel/core@7.24.6))(@react-native/assets-registry@0.73.1)(@types/react@18.2.79)(react@18.2.0) + react-native-gesture-handler: + specifier: 2.16.1 + version: 2.16.1(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.25.8(@babel/core@7.24.6))(@react-native/assets-registry@0.73.1)(@types/react@18.2.79)(react@18.2.0))(react@18.2.0) react-native-reanimated: specifier: 3.10.1 version: 3.10.1(@babel/core@7.24.6)(react-native@0.74.1(@babel/core@7.24.6)(@babel/preset-env@7.25.8(@babel/core@7.24.6))(@react-native/assets-registry@0.73.1)(@types/react@18.2.79)(react@18.2.0))(react@18.2.0)