Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .eas/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Deploy

on:
push:
branches: ['main']

jobs:
deploy:
type: deploy
name: Deploy
environment: production
params:
prod: true
18 changes: 18 additions & 0 deletions .eas/workflows/development-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Development Build

jobs:
android_development_build:
type: build
params:
platform: android
profile: development
ios_device_development_build:
type: build
params:
platform: ios
profile: development
ios_simulator_development_build:
type: build
params:
platform: ios
profile: development-simulator
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
EXPO_PUBLIC_NAME_FLAME_ENDPOINT=https://name-flame-server-1090437595615.us-central1.run.app
40 changes: 40 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: preview
on: pull_request

jobs:
update:
name: EAS Update
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
exit 1
fi

- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: npm

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: npm install

- name: Create preview
uses: expo/expo-github-action/preview@v8
with:
command: eas update --auto
15 changes: 13 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@
"userInterfaceStyle": "automatic",
"newArchEnabled": true,
"ios": {
"supportsTablet": true
"supportsTablet": true,
"bundleIdentifier": "com.builtbybennett.nameflame",
"infoPlist": {
"ITSAppUsesNonExemptEncryption": false
}
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"package": "com.builtbybennett.nameflame"
},
"web": {
"bundler": "metro",
Expand All @@ -32,6 +37,12 @@
"resizeMode": "contain",
"backgroundColor": "#ffffff"
}
],
[
"expo-font",
{
"fonts": ["./assets/fonts/BricolageGrotesque.ttf"]
}
]
],
"experiments": {
Expand Down
103 changes: 98 additions & 5 deletions app/(app)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
import { Text } from 'react-native';
import { ActivityIndicator } from 'react-native';
import { Redirect } from 'expo-router';

import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { Drawer } from 'expo-router/drawer';
import { Colors } from '../../constants/Colors';
import { MaterialIcons } from '@expo/vector-icons';
import { useRouter, useLocalSearchParams } from 'expo-router';

import { useToken } from '../../contexts/authCtx';
import { ThemedView } from '@/components/ThemedView';

export default function AppLayout() {
const { token, isLoading } = useToken();

const router = useRouter();
const { id } = useLocalSearchParams<{ id: string }>();

// You can keep the splash screen open, or render a loading screen like we do here.
if (isLoading) {
return <Text>Loading...</Text>;
return <ThemedView style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<ActivityIndicator size="large" color={Colors.core.orange} />
</ThemedView>;
}

// Only require authentication within the (app) group's layout as users
Expand All @@ -25,11 +34,95 @@ export default function AppLayout() {
// This layout can be deferred because it's not the root layout.
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<Drawer>
<Drawer.Screen
<Drawer
screenOptions={{
drawerStyle: {
backgroundColor: Colors.core.tanLighter, // Change drawer background color
},
drawerActiveTintColor: Colors.core.orange, // Change active item color
drawerInactiveTintColor: Colors.core.black, // Change inactive item color
}}
>
<Drawer.Screen
name="index" // This is the name of the page and must match the url from root
options={{
drawerItemStyle: { display: 'none' }, // Hide from drawer navigation
}}
/>
<Drawer.Screen
name="nameContext/[id]/matches" // This is the name of the page and must match the url from root
options={{
headerTitle: 'Name Context Matches',
drawerItemStyle: { display: 'none' }, // Hide from drawer navigation
}}
/>
<Drawer.Screen
name="nameContext/index" // This is the name of the page and must match the url from root
options={{
drawerLabel: 'Name Contexts',
headerTitle: 'Name Contexts',
headerStyle: {
backgroundColor: Colors.core.tan, // Set header background color
},
headerRight: () => (
<MaterialIcons
name="add"
size={24}
aria-label='Add Name Context'
color={Colors.core.orange}
onPress={() => router.push('./nameContext/new')}
style={{ marginRight: 10 }}
/>
),
}}
/>
<Drawer.Screen
name="nameContext/[id]" // This is the name of the page and must match the url from root
options={{
headerTitle: 'Name Context Details',
headerStyle: {
backgroundColor: Colors.core.tan, // Set header background color
},
drawerItemStyle: { display: 'none' }, // Hide from drawer navigation
headerLeft: () => (
<MaterialIcons
name="arrow-back"
size={24}
aria-label='Back'
color={Colors.core.orange}
onPress={() => router.back()}
style={{ marginLeft: 10 }}
/>
),
headerRight: () => (
id === 'new'
? null
: (
<MaterialIcons
name="delete"
size={24}
aria-label='Add Name Context'
color={Colors.core.orange}
onPress={() => alert('Delete')}
style={{ marginRight: 10 }}
/>)
),
}}
/>
<Drawer.Screen
name="settings/index" // This is the name of the page and must match the url from root
options={{
drawerLabel: 'Settings'
drawerLabel: 'Settings',
headerTitle: 'Settings',
headerStyle: {
backgroundColor: Colors.core.tan, // Set header background color
},
}}
/>
<Drawer.Screen
name="sign-out" // This is the name of the page and must match the url from root
options={{
drawerLabel: 'Sign Out',
}}
/>
</Drawer>
Expand Down
10 changes: 2 additions & 8 deletions app/(app)/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { Text, View } from 'react-native';
import { Redirect } from 'expo-router';

export default function Index() {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#fff' }}>
<Text>
App Landing
</Text>
</View>
);
return <Redirect href="/nameContext" />;
}
11 changes: 0 additions & 11 deletions app/(app)/match/index.js

This file was deleted.

Loading