Skip to content

Commit dc08157

Browse files
committed
Fix basic issues with Expo; fix timestamp default issues
1 parent d7c7e6e commit dc08157

120 files changed

Lines changed: 2143 additions & 3856 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
"typescript.tsdk": "node_modules/typescript/lib",
3030
"[typescript]": {
3131
"editor.defaultFormatter": "esbenp.prettier-vscode"
32-
}
32+
},
33+
"java.compile.nullAnalysis.mode": "automatic"
3334
}

apps/auth-proxy/sst-env.d.ts

Lines changed: 4 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -2,95 +2,8 @@
22
/* tslint:disable */
33
/* eslint-disable */
44
/* deno-fmt-ignore-file */
5+
6+
/// <reference path="../../sst-env.d.ts" />
7+
58
import "sst"
6-
export {}
7-
declare module "sst" {
8-
export interface Resource {
9-
"AuthChallengeEncryptionKey": {
10-
"type": "sst.sst.Secret"
11-
"value": string
12-
}
13-
"AuthHomefrontClientId": {
14-
"type": "sst.sst.Secret"
15-
"value": string
16-
}
17-
"AuthHomefrontClientSecret": {
18-
"type": "sst.sst.Secret"
19-
"value": string
20-
}
21-
"AuthMiniSessionEncryptionKey": {
22-
"type": "sst.sst.Secret"
23-
"value": string
24-
}
25-
"AuthSalt": {
26-
"type": "sst.sst.Secret"
27-
"value": string
28-
}
29-
"AuthSecret": {
30-
"type": "sst.sst.Secret"
31-
"value": string
32-
}
33-
"AuthSessionCreatorSecret": {
34-
"type": "sst.sst.Secret"
35-
"value": string
36-
}
37-
"DatabaseUrl": {
38-
"type": "sst.sst.Secret"
39-
"value": string
40-
}
41-
"DbEncryptionKey": {
42-
"type": "sst.sst.Secret"
43-
"value": string
44-
}
45-
"OauthEncryptionKey": {
46-
"type": "sst.sst.Secret"
47-
"value": string
48-
}
49-
"OauthSecret": {
50-
"type": "sst.sst.Secret"
51-
"value": string
52-
}
53-
"OtpEncryptionKey": {
54-
"type": "sst.sst.Secret"
55-
"value": string
56-
}
57-
"PineconeApiKey": {
58-
"type": "sst.sst.Secret"
59-
"value": string
60-
}
61-
"Redis": {
62-
"host": string
63-
"password": string
64-
"port": number
65-
"type": "sst.aws.Redis"
66-
"username": string
67-
}
68-
"StripeHashKey": {
69-
"type": "sst.sst.Secret"
70-
"value": string
71-
}
72-
"StripeSecretKey": {
73-
"type": "sst.sst.Secret"
74-
"value": string
75-
}
76-
"StripeWebhookSecret": {
77-
"type": "sst.sst.Secret"
78-
"value": string
79-
}
80-
"Vpc": {
81-
"type": "sst.aws.Vpc"
82-
}
83-
"Web": {
84-
"type": "sst.aws.Nextjs"
85-
"url": string
86-
}
87-
"homefront-next-prod": {
88-
"name": string
89-
"type": "sst.aws.Bucket"
90-
}
91-
"join-homefront": {
92-
"name": string
93-
"type": "sst.aws.Bucket"
94-
}
95-
}
96-
}
9+
export {}

apps/expo/package.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
},
1717
"dependencies": {
1818
"@bacons/text-decoder": "^0.0.0",
19+
"@expo-google-fonts/fira-code": "^0.2.3",
20+
"@expo-google-fonts/inter": "^0.2.3",
21+
"@expo-google-fonts/oswald": "^0.2.3",
22+
"@expo-google-fonts/pt-serif": "^0.2.3",
1923
"@expo/metro-config": "^0.19.9",
2024
"@homefront/api": "workspace:*",
2125
"@homefront/app": "workspace:*",
@@ -67,6 +71,7 @@
6771
"expo-constants": "catalog:",
6872
"expo-dev-client": "catalog:",
6973
"expo-device": "catalog:",
74+
"expo-font": "catalog:",
7075
"expo-image": "catalog:",
7176
"expo-linking": "catalog:",
7277
"expo-location": "catalog:",
@@ -84,6 +89,7 @@
8489
"react-dom": "catalog:react-for-expo",
8590
"react-native": "catalog:react-for-expo",
8691
"react-native-bouncy-checkbox": "catalog:",
92+
"react-native-css-interop": "catalog:",
8793
"react-native-gesture-handler": "~2.20.0",
8894
"react-native-get-random-values": "catalog:",
8995
"react-native-markdown-display": "catalog:",
@@ -94,14 +100,13 @@
94100
"react-native-screens": "catalog:",
95101
"react-native-svg": "catalog:",
96102
"react-native-url-polyfill": "catalog:",
97-
"solito": "catalog:",
98-
"superjson": "2.2.1",
103+
"superjson": "catalog:",
99104
"tailwind-merge": "catalog:"
100105
},
101106
"devDependencies": {
102-
"@babel/core": "^7.25.8",
103-
"@babel/preset-env": "^7.25.8",
104-
"@babel/runtime": "^7.25.7",
107+
"@babel/core": "^7.26.7",
108+
"@babel/preset-env": "^7.26.7",
109+
"@babel/runtime": "^7.26.7",
105110
"@homefront/eslint-config": "workspace:*",
106111
"@homefront/prettier-config": "workspace:*",
107112
"@homefront/tailwind-config": "workspace:*",

apps/expo/src/app/_layout.tsx

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,59 @@
11
import "@bacons/text-decoder/install";
22

3-
import { StrictMode } from "react";
4-
import { Stack } from "expo-router";
3+
import { StrictMode, useEffect, useState } from "react";
4+
import { SplashScreen, Stack } from "expo-router";
55
import { StatusBar } from "expo-status-bar";
66
import { NavigationContainer } from "@react-navigation/native";
77
import { useColorScheme } from "nativewind";
88

99
import { Provider } from "@homefront/app/provider";
1010
import colors from "@homefront/ui/colors";
1111

12+
import { loadFonts } from "~/utils/loadFonts";
13+
1214
import "../globals.css";
1315

16+
// Prevent the splash screen from auto-hiding before asset loading is complete.
17+
void SplashScreen.preventAutoHideAsync();
18+
1419
export default function Layout() {
1520
const { colorScheme } = useColorScheme();
21+
const [fontsLoaded, setFontsLoaded] = useState(false);
22+
23+
// Load fonts and hide the splash screen when ready.
24+
useEffect(() => {
25+
async function prepare() {
26+
try {
27+
const success = await loadFonts();
28+
setFontsLoaded(success);
29+
} catch (e) {
30+
console.error("Font loading error:", e);
31+
} finally {
32+
await SplashScreen.hideAsync();
33+
}
34+
}
35+
prepare();
36+
}, []);
37+
38+
// Wait for fonts to load before rendering the app.
39+
if (!fontsLoaded) {
40+
return null;
41+
}
42+
1643
return (
1744
<StrictMode>
1845
<NavigationContainer>
1946
<Provider>
2047
<Stack
2148
screenOptions={{
22-
headerStyle: {
23-
backgroundColor: colors.primary[500],
24-
},
49+
header: () => null,
2550
contentStyle: {
26-
backgroundColor: colorScheme === "dark" ? "#09090B" : "#FFFFFF",
51+
backgroundColor:
52+
colorScheme === "dark" ? colors.gray[950] : "white",
2753
},
2854
}}
2955
/>
30-
<StatusBar />
56+
<StatusBar translucent backgroundColor="transparent" />
3157
</Provider>
3258
</NavigationContainer>
3359
</StrictMode>

apps/expo/src/app/index.tsx

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,23 @@
1-
import { View } from "react-native";
2-
import { SafeAreaView } from "react-native-safe-area-context";
31
import { Stack } from "expo-router";
4-
import { verifyInstallation } from "nativewind";
52

3+
import { SignInScreen } from "@homefront/app/features/auth/SignInScreen";
64
import { SplashScreen } from "@homefront/app/features/splash/SplashScreen";
7-
import { Text } from "@homefront/ui";
85

96
export default function Index() {
10-
verifyInstallation();
117
return (
12-
<SafeAreaView>
8+
<>
139
<Stack.Screen
1410
options={{
1511
title: "Home Page",
12+
headerShown: false,
13+
headerTransparent: true,
14+
headerTitle: "",
15+
headerTintColor: "white",
1616
}}
1717
/>
1818

19-
<View className="flex-column flex-1 items-center justify-center px-4">
20-
<Text className="w-full flex-1 text-center text-5xl font-bold text-foreground">
21-
Create <Text className="text-primary">T3</Text> Turbo
22-
</Text>
23-
24-
{/* Debug component to verify styles */}
25-
<View className="mt-4 h-20 w-20 bg-red-700" />
26-
<SplashScreen />
27-
</View>
28-
</SafeAreaView>
19+
{/* <SplashScreen /> */}
20+
<SignInScreen />
21+
</>
2922
);
3023
}

apps/expo/src/utils/loadFonts.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { loadAsync } from "expo-font";
2+
import {
3+
FiraCode_400Regular,
4+
FiraCode_500Medium,
5+
FiraCode_700Bold,
6+
} from "@expo-google-fonts/fira-code";
7+
import {
8+
Inter_400Regular,
9+
Inter_500Medium,
10+
Inter_700Bold,
11+
} from "@expo-google-fonts/inter";
12+
import {
13+
Oswald_400Regular,
14+
Oswald_500Medium,
15+
Oswald_700Bold,
16+
} from "@expo-google-fonts/oswald";
17+
import {
18+
PTSerif_400Regular,
19+
PTSerif_700Bold,
20+
} from "@expo-google-fonts/pt-serif";
21+
22+
export async function loadFonts() {
23+
try {
24+
console.log("Starting font loading...");
25+
26+
const fonts = {
27+
"Inter-Regular": Inter_400Regular,
28+
"Inter-Medium": Inter_500Medium,
29+
"Inter-Bold": Inter_700Bold,
30+
"Oswald-Regular": Oswald_400Regular,
31+
"Oswald-Medium": Oswald_500Medium,
32+
"Oswald-Bold": Oswald_700Bold,
33+
"FiraCode-Regular": FiraCode_400Regular,
34+
"FiraCode-Medium": FiraCode_500Medium,
35+
"FiraCode-Bold": FiraCode_700Bold,
36+
"PTSerif-Regular": PTSerif_400Regular,
37+
"PTSerif-Bold": PTSerif_700Bold,
38+
};
39+
40+
await loadAsync(fonts);
41+
console.log("Fonts loaded successfully");
42+
return true;
43+
} catch (error) {
44+
console.error("Error loading fonts:", error);
45+
return false;
46+
}
47+
}

0 commit comments

Comments
 (0)