Skip to content

Commit

Permalink
chore: update expo
Browse files Browse the repository at this point in the history
  • Loading branch information
Trevor Pfizemaier authored and Trevor Pfizemaier committed Nov 12, 2024
1 parent 99faf65 commit f78aa2c
Show file tree
Hide file tree
Showing 4 changed files with 185 additions and 69 deletions.
9 changes: 9 additions & 0 deletions apps/expo/eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
"distribution": "internal",
"autoIncrement": true
},
"development-simulator": {
"extends": "base",
"developmentClient": true,
"distribution": "internal",
"ios": {
"simulator": true
},
"autoIncrement": true
},
"preview": {
"extends": "base",
"distribution": "internal",
Expand Down
40 changes: 20 additions & 20 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"@expo-google-fonts/inter": "^0.2.3",
"@expo/metro-config": "~0.19.0-preview.3",
"@expo/metro-config": "~0.19.1",
"@expo/vector-icons": "^14.0.4",
"@gorhom/bottom-sheet": "^5.0.5",
"@hookform/resolvers": "^3.9.1",
Expand All @@ -33,8 +33,8 @@
"@radix-ui/react-tooltip": "^1.1.3",
"@react-native-async-storage/async-storage": "^1.23.1",
"@react-native-google-signin/google-signin": "^13.1.0",
"@react-navigation/drawer": "^6.7.2",
"@react-navigation/native": "^6.1.18",
"@react-navigation/drawer": "^7.0.0",
"@react-navigation/native": "^7.0.0",
"@rn-primitives/avatar": "^1.1.0",
"@rn-primitives/dialog": "^1.1.0",
"@rn-primitives/hooks": "^1.1.0",
Expand All @@ -49,7 +49,7 @@
"@rn-primitives/types": "^1.1.0",
"@rn-primitives/utils": "^1.1.0",
"@shopify/flash-list": "1.7.1",
"@shopify/react-native-skia": "^1.5.0",
"@shopify/react-native-skia": "1.5.0",
"@supabase/auth-helpers-react": "catalog:supabase",
"@supabase/supabase-js": "catalog:supabase",
"@tanstack/react-query": "catalog:",
Expand All @@ -60,63 +60,63 @@
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"date-fns": "catalog:dates",
"expo": "~52.0.0-preview.22",
"expo": "~52.0.3",
"expo-apple-authentication": "~7.0.1",
"expo-application": "~6.0.1",
"expo-build-properties": "~0.13.1",
"expo-clipboard": "~7.0.0",
"expo-constants": "~17.0.2",
"expo-crypto": "~14.0.1",
"expo-dev-client": "~5.0.0-preview.8",
"expo-file-system": "~18.0.0",
"expo-dev-client": "~5.0.1",
"expo-file-system": "~18.0.2",
"expo-font": "~13.0.1",
"expo-haptics": "~14.0.0",
"expo-image": "2.0.0-preview.1",
"expo-image": "2.0.0",
"expo-keep-awake": "~14.0.1",
"expo-linear-gradient": "~14.0.1",
"expo-linking": "~7.0.2",
"expo-localization": "~16.0.0",
"expo-navigation-bar": "~4.0.2",
"expo-notifications": "~0.29.5",
"expo-router": "~4.0.0-preview.14",
"expo-notifications": "~0.29.6",
"expo-router": "~4.0.2",
"expo-secure-store": "~14.0.0",
"expo-sharing": "~13.0.0",
"expo-splash-screen": "0.29.3",
"expo-splash-screen": "0.29.7",
"expo-status-bar": "~2.0.0",
"expo-system-ui": "~4.0.2",
"expo-updates": "~0.26.4",
"expo-updates": "~0.26.5",
"expo-web-browser": "~14.0.0",
"lucide-react-native": "^0.454.0",
"lucide-react-native": "^0.456.0",
"luxon": "catalog:dates",
"nativewind": "^4.1.23",
"p-queue": "^8.0.1",
"react": "catalog:react18",
"react-dom": "catalog:react18",
"react-hook-form": "^7.53.1",
"react-hook-form": "^7.53.2",
"react-native": "~0.76.1",
"react-native-avoid-softinput": "^6.0.2",
"react-native-gesture-handler": "~2.20.2",
"react-native-get-random-values": "~1.11.0",
"react-native-health": "^1.19.0",
"react-native-keyboard-controller": "^1.14.2",
"react-native-keyboard-controller": "^1.14.4",
"react-native-mmkv": "^3.1.0",
"react-native-pager-view": "^6.5.0",
"react-native-reanimated": "~3.16.1",
"react-native-redash": "^18.1.3",
"react-native-root-siblings": "^5.0.1",
"react-native-root-toast": "^3.6.0",
"react-native-safe-area-context": "~4.12.0",
"react-native-screens": "4.0.0-beta.16",
"react-native-screens": "^4.0.0",
"react-native-svg": "^15.8.0",
"react-native-url-polyfill": "^2.0.0",
"react-native-vision-camera": "^4.5.3",
"react-native-vision-camera": "^4.6.1",
"react-native-web": "~0.19.13",
"superjson": "catalog:",
"tailwind-merge": "^2.5.4",
"tailwindcss": "catalog:tailwind",
"tailwindcss-animate": "catalog:tailwind",
"victory-native": "^41.6.2",
"zustand": "^5.0.0"
"victory-native": "^41.9.0",
"zustand": "^5.0.1"
},
"devDependencies": {
"@babel/core": "^7.25.9",
Expand All @@ -139,7 +139,7 @@
"eslint": "catalog:",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-expo": "~52.0.0-preview.4",
"jest-expo": "~52.0.0",
"jest-junit": "^16.0.0",
"prettier": "catalog:",
"react-test-renderer": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/src/app/(app)/(tabs)/account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function AccountScreen() {
<DexcomLogin />

{/* <DexcomBackgroundSync /> */}
<DexcomCGMData />
{/* <DexcomCGMData /> */}
{/* <CalculateRecap /> */}
{/* <DexcomDevicesList /> */}
</ScrollView>
Expand Down
203 changes: 155 additions & 48 deletions apps/expo/src/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import "../global.css";

import type { Theme } from "@react-navigation/native";
import { useEffect, useState } from "react";
import { Platform, View } from "react-native";
import { useSafeAreaEnv } from "react-native-css-interop/dist/runtime/api";
import { Platform } from "react-native";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import {
initialWindowMetrics,
Expand All @@ -29,13 +28,128 @@ import { useGlucoseStore } from "~/stores/glucose-store";
import { TRPCProvider } from "~/utils/api";
import { supabase } from "~/utils/supabase";

const WEB_FONT_STACK =
'system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';

const LIGHT_THEME: Theme = {
dark: false,
colors: NAV_THEME.light,
fonts: Platform.select({
web: {
regular: {
fontFamily: WEB_FONT_STACK,
fontWeight: "400",
},
medium: {
fontFamily: WEB_FONT_STACK,
fontWeight: "500",
},
bold: {
fontFamily: WEB_FONT_STACK,
fontWeight: "600",
},
heavy: {
fontFamily: WEB_FONT_STACK,
fontWeight: "700",
},
},
ios: {
regular: {
fontFamily: "System",
fontWeight: "400",
},
medium: {
fontFamily: "System",
fontWeight: "500",
},
bold: {
fontFamily: "System",
fontWeight: "600",
},
heavy: {
fontFamily: "System",
fontWeight: "700",
},
},
default: {
regular: {
fontFamily: "sans-serif",
fontWeight: "normal",
},
medium: {
fontFamily: "sans-serif-medium",
fontWeight: "normal",
},
bold: {
fontFamily: "sans-serif",
fontWeight: "600",
},
heavy: {
fontFamily: "sans-serif",
fontWeight: "700",
},
},
}),
};
const DARK_THEME: Theme = {
dark: true,
colors: NAV_THEME.dark,
fonts: Platform.select({
web: {
regular: {
fontFamily: WEB_FONT_STACK,
fontWeight: "400",
},
medium: {
fontFamily: WEB_FONT_STACK,
fontWeight: "500",
},
bold: {
fontFamily: WEB_FONT_STACK,
fontWeight: "600",
},
heavy: {
fontFamily: WEB_FONT_STACK,
fontWeight: "700",
},
},
ios: {
regular: {
fontFamily: "System",
fontWeight: "400",
},
medium: {
fontFamily: "System",
fontWeight: "500",
},
bold: {
fontFamily: "System",
fontWeight: "600",
},
heavy: {
fontFamily: "System",
fontWeight: "700",
},
},
default: {
regular: {
fontFamily: "sans-serif",
fontWeight: "normal",
},
medium: {
fontFamily: "sans-serif-medium",
fontWeight: "normal",
},
bold: {
fontFamily: "sans-serif",
fontWeight: "600",
},
heavy: {
fontFamily: "sans-serif",
fontWeight: "700",
},
},
}),
};

export {
Expand Down Expand Up @@ -80,7 +194,7 @@ const InitialLayout = () => {
const inAppGroup = segments[0] === "(app)";

if (isSignedIn && !inAppGroup) {
router.replace("/(tabs)");
router.replace("/(app)/(tabs)");
} else if (!isSignedIn && inAppGroup) {
router.replace("/(home)");
}
Expand All @@ -92,46 +206,44 @@ const InitialLayout = () => {

return (
<>
<SafeAreaEnv>
<Stack>
<Stack.Screen
name="(home)/index"
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="(auth)/signup"
options={{
presentation: "modal",
title: "Sign Up",
headerTitle: "",
headerLeft: HeaderCloseButton,
}}
/>
<Stack.Screen
name="(auth)/signin"
options={{
presentation: "modal",
title: "Sign In",
headerTitle: "",
headerLeft: HeaderCloseButton,
}}
/>
<Stack.Screen
name="(auth)/reset-password"
options={{
presentation: "modal",
title: "Reset Password",
headerTitle: "",
headerLeft: HeaderCloseButton,
}}
/>
<Stack.Screen name="(app)" options={{ headerShown: false }} />
</Stack>

<PortalHost />
</SafeAreaEnv>
<Stack>
<Stack.Screen
name="(home)/index"
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="(auth)/signup"
options={{
presentation: "modal",
title: "Sign Up",
headerTitle: "",
headerLeft: HeaderCloseButton,
}}
/>
<Stack.Screen
name="(auth)/signin"
options={{
presentation: "modal",
title: "Sign In",
headerTitle: "",
headerLeft: HeaderCloseButton,
}}
/>
<Stack.Screen
name="(auth)/reset-password"
options={{
presentation: "modal",
title: "Reset Password",
headerTitle: "",
headerLeft: HeaderCloseButton,
}}
/>
<Stack.Screen name="(app)" options={{ headerShown: false }} />
</Stack>

<PortalHost />
</>
);
};
Expand Down Expand Up @@ -203,8 +315,3 @@ export default function RootLayout() {
</SessionContextProvider>
);
}

function SafeAreaEnv({ children }: { children: React.ReactNode }) {
// Add the safe area insets to the render tree
return <View style={[{ flex: 1 }, useSafeAreaEnv()]}>{children}</View>;
}

0 comments on commit f78aa2c

Please sign in to comment.