Skip to content

Commit 6ce9675

Browse files
committed
chore: add bolt config file and fix deps
1 parent 9bf8c51 commit 6ce9675

File tree

14 files changed

+13837
-50
lines changed

14 files changed

+13837
-50
lines changed

.bolt/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"template": "bolt-expo"
3+
}

.bolt/prompt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
By default, this template supports JSX syntax with Tailwind CSS classes with Nativewind,
2+
React hooks, and lucide-react-native for icons.
3+
4+
Use use components in /components/ui, example :
5+
`
6+
import { Text } from '@/components/ui';
7+
`
8+
Do not install other packages for UI themes, icons, etc unless absolutely necessary or I request them.

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"[javascript]": {
2020
"editor.defaultFormatter": "biomejs.biome"
2121
},
22-
"css.customData": [".vscode/css_custom_data.json"],
2322
"files.associations": {
2423
"*.css": "tailwindcss"
2524
}

app.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
3232
},
3333
web: {
3434
bundler: "metro",
35-
output: "single",
35+
output: "server",
3636
favicon: "./assets/images/favicon.png",
3737
},
3838
plugins: [
@@ -43,6 +43,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
4343
},
4444
],
4545
["expo-sqlite"],
46+
["expo-font"],
4647
],
4748
experiments: {
4849
typedRoutes: true,

app/_layout.tsx

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import "./global.css";
2-
import {BottomSheetModalProvider} from "@gorhom/bottom-sheet";
3-
import {type Theme, ThemeProvider} from "@react-navigation/native";
4-
import {SplashScreen, Stack} from "expo-router";
5-
import {StatusBar} from "expo-status-bar";
2+
import { BottomSheetModalProvider } from "@gorhom/bottom-sheet";
3+
import { type Theme, ThemeProvider } from "@react-navigation/native";
4+
import { SplashScreen, Stack } from "expo-router";
5+
import { StatusBar } from "expo-status-bar";
66
import * as React from "react";
7-
import {GestureHandlerRootView} from "react-native-gesture-handler";
8-
import {PortalHost} from "@/components/primitives/portal";
9-
import {DatabaseProvider} from "@/db/provider";
10-
import {setAndroidNavigationBar} from "@/lib/android-navigation-bar";
11-
import {NAV_THEME} from "@/lib/constants";
12-
import {useColorScheme} from "@/lib/useColorScheme";
13-
import {getItem, setItem} from "@/lib/storage";
14-
import {Platform} from "react-native";
7+
import { GestureHandlerRootView } from "react-native-gesture-handler";
8+
import { PortalHost } from "@/components/primitives/portal";
9+
import { DatabaseProvider } from "@/db/provider";
10+
import { setAndroidNavigationBar } from "@/lib/android-navigation-bar";
11+
import { NAV_THEME } from "@/lib/constants";
12+
import { useColorScheme } from "@/lib/useColorScheme";
13+
import { getItem, setItem } from "@/lib/storage";
14+
import { Platform } from "react-native";
1515

1616
const NAV_FONT_FAMILY = "Inter-Black";
1717
const LIGHT_THEME: Theme = {
@@ -72,7 +72,7 @@ export const unstable_settings = {
7272
SplashScreen.preventAutoHideAsync();
7373

7474
export default function RootLayout() {
75-
const {colorScheme, setColorScheme} = useColorScheme();
75+
const { colorScheme, setColorScheme } = useColorScheme();
7676
const [isColorSchemeLoaded, setIsColorSchemeLoaded] = React.useState(false);
7777

7878
React.useEffect(() => {
@@ -108,10 +108,10 @@ export default function RootLayout() {
108108
<DatabaseProvider>
109109
<ThemeProvider value={colorScheme === "dark" ? DARK_THEME : LIGHT_THEME}>
110110
<StatusBar style={colorScheme === "dark" ? "light" : "dark"} />
111-
<GestureHandlerRootView style={{flex: 1}}>
111+
<GestureHandlerRootView style={{ flex: 1 }}>
112112
<BottomSheetModalProvider>
113113
<Stack>
114-
<Stack.Screen name="(tabs)" options={{headerShown: false}} />
114+
<Stack.Screen name="(tabs)" options={{ title: "Habits", headerShown: false }} />
115115
<Stack.Screen options={{
116116
headerShadowVisible: false,
117117
}} name="habits/archive" />
@@ -125,8 +125,6 @@ export default function RootLayout() {
125125

126126
</DatabaseProvider>
127127
<PortalHost />
128-
129-
130128
</>
131129

132130
);

bun.lockb

-449 KB
Binary file not shown.

db/drizzle.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import type { SQLJsDatabase } from "drizzle-orm/sql-js";
66
import migrations from "./migrations/migrations";
77

88
const expoDb = openDatabaseSync("database.db", { enableChangeListener: true });
9-
export const db = drizzle(expoDb);
9+
const db = drizzle(expoDb);
1010

11-
export const initialize = (): Promise<SQLJsDatabase | ExpoSQLiteDatabase> => {
11+
export const initialize = (): Promise<ExpoSQLiteDatabase> => {
1212
return Promise.resolve(db);
1313
};
1414
export const useMigrationHelper = () => {
15-
return useMigrations(db as ExpoSQLiteDatabase, migrations);
15+
return useMigrations(db, migrations);
1616
};

db/drizzle.web.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import initSqlJs from "sql.js";
33
import { useDatabase } from "./provider";
44
import { useEffect, useReducer } from "react";
55

6+
67
export const initialize = async (): Promise<SQLJsDatabase> => {
78
const sqlPromise = initSqlJs({
89
locateFile: (file) => `https://sql.js.org/dist/${file}`,

index.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

lib/icons/iconWithClassName.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { LucideIcon } from "lucide-react-native";
22
import { cssInterop } from "nativewind";
3-
import type { IconProps } from "phosphor-react-native/src/lib";
43

54
export function iconWithClassName(icon: LucideIcon) {
65
cssInterop(icon, {

0 commit comments

Comments
 (0)