Skip to content

Commit

Permalink
init repository
Browse files Browse the repository at this point in the history
  • Loading branch information
starmastar1126 committed Nov 21, 2023
0 parents commit 7d814b7
Show file tree
Hide file tree
Showing 64 changed files with 20,336 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
EXPO_PUBLIC_ENV=dev
#EXPO_PUBLIC_ENV=prod
EXPO_PUBLIC_API_URL=https://staging.geniejam.com/api/chain
EXPO_PUBLIC_USERFRONT_ID=xxxxx
EXPO_PUBLIC_ENABLE_LOGGING=true
EXPO_PUBLIC_ENABLE_BUGSNAG=false
EXPO_PUBLIC_BUGSNAG_APIKEY=xxxx

# analytics
EXPO_PUBLIC_ENABLE_ANALYTICS=false
EXPO_PUBLIC_MIXPANEL_URL=https://rebelfi.io/mix/
EXPO_PUBLIC_MIXPANEL_PROJECT_TOKEN=xxxxxxxxyyyyyy

42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

# dependencies
node_modules/

# Expo
.expo/
dist/
web-build/

# Native
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision

# Metro
.metro-health-check*

# debug
npm-debug.*
yarn-debug.*
yarn-error.*

# macOS
.DS_Store
*.pem

# local env files
.env*.local
.env

# typescript
*.tsbuildinfo

# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
# The following patterns were generated by expo-cli

expo-env.d.ts
# @end expo-cli
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
63 changes: 63 additions & 0 deletions App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import FontAwesome from '@expo/vector-icons/FontAwesome';
import { useFonts } from 'expo-font';
import { SplashScreen } from 'expo-router';

import { useEffect } from 'react';
import { RecoilRoot } from 'recoil';
import { useColorScheme, StyleSheet, Text, View } from 'react-native';
import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native';
// import Toast from 'react-native-toast-message';

import AppContainer from '@navigations';
import { Loading } from '@components';
import { Images, Fonts, Colors, Themes } from '@constants';

SplashScreen.preventAutoHideAsync();


export {
// Catch any errors thrown by the Layout component.
ErrorBoundary,
} from 'expo-router';

export default function App() {
const colorScheme = useColorScheme();

const [loaded, error] = useFonts({
SpaceMono: require('@assets/fonts/SpaceMono-Regular.ttf'),
...FontAwesome.font,
});

useEffect(() => {
if (error) throw error;
}, [error]);

useEffect(() => {
if (loaded) {
SplashScreen.hideAsync();
}
}, [loaded]);

if (!loaded) {
return null;
}

return (
<RecoilRoot>
<ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
<AppContainer />
<Loading />
{/* <Toast /> */}
</ThemeProvider>
</RecoilRoot>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: Colors.white,
alignItems: 'center',
justifyContent: 'center',
},
});
45 changes: 45 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"expo": {
"name": "RebelFi",
"slug": "app-fi",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./app/assets/images/icon.png",
"scheme": "myapp",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./app/assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./app/assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"web": {
"bundler": "metro",
"output": "static",
"favicon": "./app/assets/images/favicon.png"
},
"plugins": [
"expo-router",
[
"expo-barcode-scanner",
{
"cameraPermission": "Allow RebelFi to access camera."
}
]
],
"experiments": {
"typedRoutes": true
}
}
}
Binary file added app/assets/fonts/SpaceMono-Regular.ttf
Binary file not shown.
Binary file added app/assets/images/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/assets/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name": "@assets"
}
44 changes: 44 additions & 0 deletions app/components/Button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React from 'react';
import { widthPercentageToDP as wp, heightPercentageToDP as hp } from 'react-native-responsive-screen';
import {
Platform,
SafeAreaView,
StyleSheet,
TouchableOpacity,
View,
Text
} from 'react-native';

import { useRecoilValue } from 'recoil';

import { Images, Fonts, Colors, Themes, Urls } from '@constants';
import { isLog } from '@services/functions';

export default Button = (props) => {

return (
<TouchableOpacity
style={[styles.container, { marginTop: props.marginTop, opacity: props.disabled ? 0.5 : 1 }]}
disabled={props.disabled}
onPress={props.onPress}
>
<Text style={styles.textName}>{props.name}</Text>
</TouchableOpacity>
);
};

const styles = StyleSheet.create({
container: {
justifyContent: 'center',
alignItems: 'center',
width: '100%',
height: 50,
backgroundColor: Colors.blue,
borderRadius: 5
},
textName: {
fontSize: 15,
fontWeight: '500',
color: Colors.white
}
});
41 changes: 41 additions & 0 deletions app/components/Header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from 'react';
import { widthPercentageToDP as wp, heightPercentageToDP as hp } from 'react-native-responsive-screen';
import {
Platform,
SafeAreaView,
StyleSheet,
View,
Text
} from 'react-native';

import { useRecoilValue } from 'recoil';

import { Images, Fonts, Colors, Themes, Urls } from '@constants';
import { isLog } from '@services/functions';

export default Header = (props) => {

return (
<View style={styles.container}>
<Text style={styles.textTitle}>{props.title}</Text>
<Text style={styles.textDescription}>{props.description}</Text>
</View>
);
};

const styles = StyleSheet.create({
container: {
width: '100%'
},
textTitle: {
fontSize: 35,
fontWeight: '700',
color: Colors.black
},
textDescription: {
marginTop: 5,
fontSize: 14,
fontWeight: '500',
color: Colors.black
}
});
43 changes: 43 additions & 0 deletions app/components/Loading.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React from 'react';
import { widthPercentageToDP as wp, heightPercentageToDP as hp } from 'react-native-responsive-screen';
import {
Platform,
SafeAreaView,
StyleSheet,
ActivityIndicator,
View,
} from 'react-native';

import { useRecoilValue } from 'recoil';

import { Images, Fonts, Colors, Themes, Urls } from '@constants';
import { isLog } from '@services/functions';
import { loadingAtom } from '@stores/normal/normal.state';

export default Loading = (props) => {
const loadingState = useRecoilValue(loadingAtom);

return (
loadingState ? (
<View style={styles.container}>
<ActivityIndicator size={'large'} color={Colors.blue} />
</View>
) : <View />
);
};

const styles = StyleSheet.create({
container: {
position: 'absolute',
justifyContent: 'center',
alignItems: 'center',
width: wp('100%'),
height: hp('100%'),
backgroundColor: Colors.white,
opacity: 0.5
},
indicator: {
width: 150,
height: 150
},
});
Loading

0 comments on commit 7d814b7

Please sign in to comment.