Skip to content

Commit

Permalink
feat: Customers Screen done
Browse files Browse the repository at this point in the history
  • Loading branch information
regisbaf committed Oct 1, 2022
1 parent 5dc1d47 commit 62a404f
Show file tree
Hide file tree
Showing 46 changed files with 25,249 additions and 11,696 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
28 changes: 28 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/jsx-runtime",
"standard-with-typescript",
"prettier"
],
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": [
"tsconfig.json"
]
},
"plugins": [
"react",
"react-native"
],
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/no-misused-promises": "off"
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ npm-debug.*
*.mobileprovision
*.orig.*
web-build/
.env
env.ts

# macOS
.DS_Store
13 changes: 13 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"quoteProps": "as-needed",
"singleQuote": true,
"semi": true,
"printWidth": 100,
"useTabs": false,
"tabWidth": 2,
"trailingComma": "es5"
}
44 changes: 22 additions & 22 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
import { useFonts } from 'expo-font';
import { StyleSheet } from 'react-native';
import { ActivityIndicator } from 'react-native';
import { TailwindProvider } from 'tailwind-rn';

import { ApolloProvider } from '@apollo/client';
import { NavigationContainer } from '@react-navigation/native';

import getEnvVars from './env';
import { client } from './src/Apollo';
import RootNavigator from './src/Navigator/RootNavigator';
import utilities from './tailwind.json';

export default function App() {
const [fontsLoaded] = useFonts({
"Poppins-Regular" : require('./assets/fonts/Poppins-Regular.ttf'),
"Poppins-SemiBold": require('./assets/fonts/Poppins-SemiBold.ttf'),
"Poppins-Bold": require('./assets/fonts/Poppins-Bold.ttf'),
"Poppins-Thin": require('./assets/fonts/Poppins-Thin.ttf'),
"Poppins-Medium": require('./assets/fonts/Poppins-Medium.ttf'),
"Poppins-Black":require('./assets/fonts/Poppins-Black.ttf')
});
const [fontsLoaded] = useFonts({
'Poppins-Regular': require('./assets/fonts/Poppins-Regular.ttf'),
'Poppins-SemiBold': require('./assets/fonts/Poppins-SemiBold.ttf'),
'Poppins-Bold': require('./assets/fonts/Poppins-Bold.ttf'),
'Poppins-Thin': require('./assets/fonts/Poppins-Thin.ttf'),
'Poppins-Medium': require('./assets/fonts/Poppins-Medium.ttf'),
'Poppins-Black': require('./assets/fonts/Poppins-Black.ttf'),
});

if (!fontsLoaded) {
return <ActivityIndicator />;
}
console.warn('as', getEnvVars().stepzenApiUrl);
return (
// @ts-ignore - TailwindProvider is missing a type definition
// @ts-expect-error - TailwindProvider is missing a type definition
<TailwindProvider utilities={utilities}>
<NavigationContainer>
<RootNavigator/>
</NavigationContainer>
<ApolloProvider client={client}>
<NavigationContainer>
<RootNavigator />
</NavigationContainer>
</ApolloProvider>
</TailwindProvider>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
16 changes: 15 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
module.exports = function(api) {
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
[
'module:react-native-dotenv',
{
moduleName: '@env',
path: '.env',
safe: true,
allowUndefined: true,
blocklist: null,
allowlist: null,
verbose: false,
},
],
],
};
};
7 changes: 7 additions & 0 deletions codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
overwrite: true
schema: "http://localhost:5001/api/moldy-goose"
documents: "src/**/*.query.ts"
generates:
src/Apollo/generated:
preset: "client"
plugins: []
14 changes: 14 additions & 0 deletions env.example.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Constants from 'expo-constants';

const ENV = {
dev: {
stepzenApiUrl: 'YOUR_API_LINK',
stepzenAuthKey: 'YOUR_API_KEY',
},
};

const getEnvVars = (env = Constants?.manifest?.releaseChannel) => {
return ENV.dev;
};

export default getEnvVars;
Loading

0 comments on commit 62a404f

Please sign in to comment.