Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #291

Merged
merged 2 commits into from
Jan 22, 2024
Merged

Dev #291

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
11 changes: 1 addition & 10 deletions apps/app/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@ module.exports = function (api) {
api.cache(true);
return {
presets: ["babel-preset-expo"],
plugins: [
[
"@tamagui/babel-plugin",
{
components: ["tamagui"],
config: "./src/tamagui.config.ts",
},
],
"react-native-reanimated/plugin",
],
plugins: ["react-native-reanimated/plugin"],
};
};
13 changes: 13 additions & 0 deletions apps/app/metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { getDefaultConfig } = require("expo/metro-config");

/** @type {import('expo/metro-config').MetroConfig} */
const config = getDefaultConfig(__dirname);

module.exports = config;

// Enable Tamagui
const { withTamagui } = require("@tamagui/metro-plugin");
module.exports = withTamagui(config, {
components: ["tamagui"],
config: "./src/tamagui.config.ts",
});
15 changes: 6 additions & 9 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build:development": "eas build --profile development --platform ios --local",
"build:production": "eas build --profile production --platform ios --local",
"types": "supabase gen types typescript --local > src/lib/database.types.ts",
"lint": "eslint src"
"lint": "eslint ./src"
},
"dependencies": {
"@gorhom/bottom-sheet": "5.0.0-alpha.6",
Expand All @@ -23,12 +23,9 @@
"@sanity/client": "6.11.1",
"@shopify/flash-list": "1.6.3",
"@supabase/supabase-js": "2.39.3",
"@tamagui/animations-react-native": "1.86.6",
"@tamagui/babel-plugin": "1.86.6",
"@tamagui/config": "1.86.6",
"@tamagui/font-inter": "1.86.6",
"@tamagui/lucide-icons": "1.86.6",
"@tamagui/theme-base": "1.86.6",
"@tamagui/config": "1.88.2",
"@tamagui/lucide-icons": "1.88.2",
"@tamagui/metro-plugin": "1.88.2",
"expo": "^50.0.2",
"expo-apple-authentication": "~6.3.0",
"expo-application": "~5.8.3",
Expand All @@ -43,7 +40,7 @@
"expo-image": "~1.10.4",
"expo-linking": "~6.2.2",
"expo-media-library": "~15.9.1",
"expo-router": "~3.4.3",
"expo-router": "~3.4.4",
"expo-sharing": "~11.10.0",
"expo-splash-screen": "~0.26.3",
"expo-status-bar": "~1.11.1",
Expand All @@ -66,7 +63,7 @@
"react-native-url-polyfill": "2.0.0",
"react-native-view-shot": "3.8.0",
"react-native-web": "0.19.10",
"tamagui": "1.86.6",
"tamagui": "1.88.2",
"vexo-analytics": "1.3.12"
},
"devDependencies": {
Expand Down
105 changes: 48 additions & 57 deletions apps/app/src/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,41 @@
import "expo-dev-client";
import { DatabaseProvider } from "@nozbe/watermelondb/DatabaseProvider";
import { TamaguiProvider, Theme } from "@tamagui/core";
import { TamaguiProvider } from "@tamagui/core";
import { useFonts } from "expo-font";
import { Stack } from "expo-router";
import { SplashScreen, Stack } from "expo-router";
import { PostHogProvider } from "posthog-react-native";
import { useEffect, useRef, useState } from "react";
import { AppState, useColorScheme } from "react-native";
import { useEffect } from "react";
import { useColorScheme } from "react-native";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { SafeAreaProvider } from "react-native-safe-area-context";
import {
DarkTheme,
DefaultTheme,
ThemeProvider,
} from "@react-navigation/native";

import "@/lib/vexo";
import { config } from "@/lib/config";
import { database } from "@/lib/watermelon";
import { AuthProvider } from "@/providers/AuthProvider";
import { NavigationThemeProvider } from "@/providers/NavigationThemeProvider";
import { SyncProvider } from "@/providers/SyncProvider";
import tamaguiConfig from "@/tamagui.config";

SplashScreen.preventAutoHideAsync();

export default function Layout() {
const appState = useRef(AppState.currentState);
const [appStateVisible, setAppStateVisible] = useState(appState.current);
const colorScheme = useColorScheme();
const [activeColorScheme, setActiveColorScheme] = useState(colorScheme);

useEffect(() => {
if (appStateVisible === "active") {
setActiveColorScheme(colorScheme);
}
}, [appStateVisible, colorScheme]);

useEffect(() => {
const subscription = AppState.addEventListener("change", (nextAppState) => {
appState.current = nextAppState;
setAppStateVisible(appState.current);
});

return () => {
subscription.remove();
};
}, []);

const [loaded] = useFonts({
const [interLoaded, interError] = useFonts({
Inter: require("@tamagui/font-inter/otf/Inter-Medium.otf"),
InterBold: require("@tamagui/font-inter/otf/Inter-Bold.otf"),
});

if (!loaded) {
return null;
}
useEffect(() => {
if (interLoaded || interError) {
SplashScreen.hideAsync();
}
}, [interLoaded, interError]);

return (
<PostHogProvider
Expand All @@ -56,34 +44,37 @@ export default function Layout() {
host: "https://app.posthog.com",
}}
>
<TamaguiProvider config={tamaguiConfig}>
<Theme name={activeColorScheme}>
<NavigationThemeProvider>
<GestureHandlerRootView style={{ flex: 1 }}>
<SafeAreaProvider>
<DatabaseProvider database={database}>
<AuthProvider>
<SyncProvider>
<Stack>
<Stack.Screen
name="(tabs)"
options={{
title: "Home",
headerShown: false,
}}
/>
<Stack.Screen
name="[profile]"
options={{ headerShown: true }}
/>
</Stack>
</SyncProvider>
</AuthProvider>
</DatabaseProvider>
</SafeAreaProvider>
</GestureHandlerRootView>
</NavigationThemeProvider>
</Theme>
<TamaguiProvider
config={tamaguiConfig}
defaultTheme={colorScheme === "dark" ? "dark" : "light"}
>
<ThemeProvider
value={colorScheme === "dark" ? DarkTheme : DefaultTheme}
>
<GestureHandlerRootView style={{ flex: 1 }}>
<SafeAreaProvider>
<DatabaseProvider database={database}>
<AuthProvider>
<SyncProvider>
<Stack>
<Stack.Screen
name="(tabs)"
options={{
title: "Home",
headerShown: false,
}}
/>
<Stack.Screen
name="[profile]"
options={{ headerShown: true }}
/>
</Stack>
</SyncProvider>
</AuthProvider>
</DatabaseProvider>
</SafeAreaProvider>
</GestureHandlerRootView>
</ThemeProvider>
</TamaguiProvider>
</PostHogProvider>
);
Expand Down
27 changes: 0 additions & 27 deletions apps/app/src/providers/NavigationThemeProvider.tsx

This file was deleted.

8 changes: 4 additions & 4 deletions apps/app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"paths": {
"@/*": ["./src/*"]
"@/*": ["./src/*"],
},
"strict": true
},
"extends": "expo/tsconfig.base",
"include": ["**/*.ts", "**/*.tsx"]
"include": ["**/*.ts", "**/*.tsx"],
}
8 changes: 4 additions & 4 deletions apps/video/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"build": "bun build ./src/index.ts --outdir ./build"
},
"dependencies": {
"@remotion/cli": "4.0.88",
"@remotion/google-fonts": "4.0.88",
"remotion": "4.0.88"
"@remotion/cli": "4.0.89",
"@remotion/google-fonts": "4.0.89",
"remotion": "4.0.89"
},
"devDependencies": {
"@remotion/tailwind": "4.0.88",
"@remotion/tailwind": "4.0.89",
"tailwindcss": "3.4.1"
},
"license": "UNLICENSED",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@supabase/auth-helpers-remix": "0.2.6",
"@supabase/supabase-js": "2.39.3",
"@tailwindcss/forms": "0.5.7",
"@tsndr/cloudflare-worker-jwt": "2.4.0",
"@tsndr/cloudflare-worker-jwt": "2.4.2",
"clsx": "2.1.0",
"framer-motion": "10.18.0",
"isbot": "4.4.0",
Expand Down
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"overrides": {
"ajv": "8.12.0"
},
"packageManager": "[email protected].22",
"packageManager": "[email protected].25",
"license": "UNLICENSED",
"private": true
}
2 changes: 1 addition & 1 deletion packages/seed-data-action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"svgo": "3.2.0"
},
"devDependencies": {
"@types/bun": "1.0.2",
"@types/bun": "1.0.3",
"@typescript-eslint/eslint-plugin": "6.19.0",
"@typescript-eslint/parser": "6.19.0",
"eslint": "8.56.0",
Expand Down