Skip to content

Commit 2b909b5

Browse files
committed
Merge branch 'master' into feature/adminweb
2 parents aceb6dd + b941212 commit 2b909b5

34 files changed

+8864
-15607
lines changed

apps/mobile/starter/.expo/packager-info.json

-9
This file was deleted.

apps/mobile/starter/.expo/settings.json

-8
This file was deleted.

apps/mobile/starter/.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules/
2+
.expo/
3+
dist/
4+
npm-debug.*
5+
*.jks
6+
*.p8
7+
*.p12
8+
*.key
9+
*.mobileprovision
10+
*.orig.*
11+
web-build/
12+
13+
# macOS
14+
.DS_Store

apps/mobile/starter/App.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { StatusBar } from 'expo-status-bar';
2-
import React from 'react';
32
import { SafeAreaProvider } from 'react-native-safe-area-context';
43

54
import useCachedResources from './hooks/useCachedResources';

apps/mobile/starter/app.json

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
"ios": {
2222
"supportsTablet": true
2323
},
24+
"android": {
25+
"adaptiveIcon": {
26+
"foregroundImage": "./assets/images/adaptive-icon.png",
27+
"backgroundColor": "#ffffff"
28+
}
29+
},
2430
"web": {
2531
"favicon": "./assets/images/favicon.png"
2632
}

apps/mobile/starter/assets/fonts/SpaceMono-Regular.ttf

100644100755
File mode changed.
Loading
21.2 KB
Loading
37.1 KB
Loading

apps/mobile/starter/babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = function(api) {
22
api.cache(true);
33
return {
4-
presets: ['babel-preset-expo'],
4+
presets: ['babel-preset-expo']
55
};
66
};

apps/mobile/starter/components/EditScreenInfo.tsx

+2-31
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as WebBrowser from 'expo-web-browser';
2-
import React from 'react';
32
import { StyleSheet, TouchableOpacity } from 'react-native';
43

54
import Colors from '../constants/Colors';
@@ -18,7 +17,7 @@ export default function EditScreenInfo({ path }: { path: string }) {
1817
</Text>
1918

2019
<View
21-
style={[styles.codeHighlightContainer, styles.homeScreenFilename]}
20+
style={[styles.codeHighlightContainer, styles.eventsScreenFilename]}
2221
darkColor="rgba(255,255,255,0.05)"
2322
lightColor="rgba(0,0,0,0.05)">
2423
<MonoText>{path}</MonoText>
@@ -50,41 +49,13 @@ function handleHelpPress() {
5049
}
5150

5251
const styles = StyleSheet.create({
53-
container: {
54-
flex: 1,
55-
backgroundColor: '#fff',
56-
},
57-
developmentModeText: {
58-
marginBottom: 20,
59-
fontSize: 14,
60-
lineHeight: 19,
61-
textAlign: 'center',
62-
},
63-
contentContainer: {
64-
paddingTop: 30,
65-
},
66-
welcomeContainer: {
67-
alignItems: 'center',
68-
marginTop: 10,
69-
marginBottom: 20,
70-
},
71-
welcomeImage: {
72-
width: 100,
73-
height: 80,
74-
resizeMode: 'contain',
75-
marginTop: 3,
76-
marginLeft: -10,
77-
},
7852
getStartedContainer: {
7953
alignItems: 'center',
8054
marginHorizontal: 50,
8155
},
82-
homeScreenFilename: {
56+
eventsScreenFilename: {
8357
marginVertical: 7,
8458
},
85-
codeHighlightText: {
86-
color: 'rgba(96,100,109, 0.8)',
87-
},
8859
codeHighlightContainer: {
8960
borderRadius: 3,
9061
paddingHorizontal: 4,

apps/mobile/starter/components/StyledText.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import * as React from 'react';
2-
31
import { Text, TextProps } from './Themed';
42

53
export function MonoText(props: TextProps) {

apps/mobile/starter/components/Themed.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import * as React from 'react';
1+
/**
2+
* Learn more about Light and Dark modes:
3+
* https://docs.expo.io/guides/color-schemes/
4+
*/
5+
26
import { Text as DefaultText, View as DefaultView } from 'react-native';
37

48
import Colors from '../constants/Colors';

apps/mobile/starter/hooks/useCachedResources.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
import { Ionicons } from '@expo/vector-icons';
1+
import { FontAwesome } from '@expo/vector-icons';
22
import * as Font from 'expo-font';
33
import * as SplashScreen from 'expo-splash-screen';
4-
import * as React from 'react';
4+
import { useEffect, useState } from 'react';
55

66
export default function useCachedResources() {
7-
const [isLoadingComplete, setLoadingComplete] = React.useState(false);
7+
const [isLoadingComplete, setLoadingComplete] = useState(false);
88

99
// Load any resources or data that we need prior to rendering the app
10-
React.useEffect(() => {
10+
useEffect(() => {
1111
async function loadResourcesAndDataAsync() {
1212
try {
1313
SplashScreen.preventAutoHideAsync();
1414

1515
// Load fonts
1616
await Font.loadAsync({
17-
...Ionicons.font,
17+
...FontAwesome.font,
1818
'space-mono': require('../assets/fonts/SpaceMono-Regular.ttf'),
1919
});
2020
} catch (e) {

apps/mobile/starter/hooks/useColorScheme.web.ts

-5
This file was deleted.

apps/mobile/starter/navigation/BottomTabNavigator.tsx

-73
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1+
/**
2+
* Learn more about deep linking with React Navigation
3+
* https://reactnavigation.org/docs/deep-linking
4+
* https://reactnavigation.org/docs/configuring-links
5+
*/
6+
7+
import { LinkingOptions } from '@react-navigation/native';
18
import * as Linking from 'expo-linking';
29

3-
export default {
4-
prefixes: [Linking.makeUrl('/')],
10+
import { RootStackParamList } from '../types';
11+
12+
const linking: LinkingOptions<RootStackParamList> = {
13+
prefixes: [Linking.createURL('/')],
514
config: {
615
screens: {
716
Root: {
817
screens: {
9-
TabOne: {
10-
screens: {
11-
TabOneScreen: 'one',
12-
},
13-
},
14-
TabTwo: {
18+
Events: {
1519
screens: {
16-
TabTwoScreen: 'two',
20+
EventsScreen: 'one',
1721
},
1822
},
1923
},
2024
},
21-
NotFound: '*',
2225
},
2326
},
2427
};
28+
29+
export default linking;
+57-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1+
/**
2+
* If you are not familiar with React Navigation, refer to the "Fundamentals" guide:
3+
* https://reactnavigation.org/docs/getting-started
4+
*
5+
*/
6+
import { FontAwesome } from '@expo/vector-icons';
7+
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
18
import { NavigationContainer, DefaultTheme, DarkTheme } from '@react-navigation/native';
2-
import { createStackNavigator } from '@react-navigation/stack';
9+
import { createNativeStackNavigator } from '@react-navigation/native-stack';
310
import * as React from 'react';
4-
import { ColorSchemeName } from 'react-native';
11+
import { ColorSchemeName, Pressable } from 'react-native';
512

6-
import NotFoundScreen from '../screens/NotFoundScreen';
7-
import { RootStackParamList } from '../types';
8-
import BottomTabNavigator from './BottomTabNavigator';
13+
import Colors from '../constants/Colors';
14+
import useColorScheme from '../hooks/useColorScheme';
15+
import EventsScreen from '../screens/EventsScreen';
16+
import { RootStackParamList, RootTabParamList, RootTabScreenProps } from '../types';
917
import LinkingConfiguration from './LinkingConfiguration';
1018

11-
// If you are not familiar with React Navigation, we recommend going through the
12-
// "Fundamentals" guide: https://reactnavigation.org/docs/getting-started
1319
export default function Navigation({ colorScheme }: { colorScheme: ColorSchemeName }) {
1420
return (
1521
<NavigationContainer
@@ -20,15 +26,53 @@ export default function Navigation({ colorScheme }: { colorScheme: ColorSchemeNa
2026
);
2127
}
2228

23-
// A root stack navigator is often used for displaying modals on top of all other content
24-
// Read more here: https://reactnavigation.org/docs/modal
25-
const Stack = createStackNavigator<RootStackParamList>();
29+
/**
30+
* A root stack navigator is often used for displaying modals on top of all other content.
31+
* https://reactnavigation.org/docs/modal
32+
*/
33+
const Stack = createNativeStackNavigator<RootStackParamList>();
2634

2735
function RootNavigator() {
2836
return (
29-
<Stack.Navigator screenOptions={{ headerShown: false }}>
30-
<Stack.Screen name="Root" component={BottomTabNavigator} />
31-
<Stack.Screen name="NotFound" component={NotFoundScreen} options={{ title: 'Oops!' }} />
37+
<Stack.Navigator>
38+
<Stack.Screen name="Root" component={BottomTabNavigator} options={{ headerShown: false }} />
3239
</Stack.Navigator>
3340
);
3441
}
42+
43+
/**
44+
* A bottom tab navigator displays tab buttons on the bottom of the display to switch screens.
45+
* https://reactnavigation.org/docs/bottom-tab-navigator
46+
*/
47+
const BottomTab = createBottomTabNavigator<RootTabParamList>();
48+
49+
function BottomTabNavigator() {
50+
const colorScheme = useColorScheme();
51+
52+
return (
53+
<BottomTab.Navigator
54+
initialRouteName="Events"
55+
screenOptions={{
56+
tabBarActiveTintColor: Colors[colorScheme].tint,
57+
}}>
58+
<BottomTab.Screen
59+
name="Events"
60+
component={EventsScreen}
61+
options={({ navigation }: RootTabScreenProps<'Events'>) => ({
62+
title: 'Events',
63+
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
64+
})}
65+
/>
66+
</BottomTab.Navigator>
67+
);
68+
}
69+
70+
/**
71+
* You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/
72+
*/
73+
function TabBarIcon(props: {
74+
name: React.ComponentProps<typeof FontAwesome>['name'];
75+
color: string;
76+
}) {
77+
return <FontAwesome size={30} style={{ marginBottom: -3 }} {...props} />;
78+
}

0 commit comments

Comments
 (0)