Skip to content

Commit

Permalink
Merge branch 'main' into feature/swagger-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
DOOduneye committed Nov 17, 2023
2 parents fd6646e + 783369c commit 3d3dc01
Show file tree
Hide file tree
Showing 79 changed files with 1,821 additions and 457 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ expo-debug.log
/.expo-shared
.env
.DS_Store
/Lib/*

# Go
*.exe
Expand Down
4 changes: 4 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
version: "3"

tasks:
dev:
cmds:
- cd scripts && ./tunnel.sh

run:
cmds:
- cd scripts && ./run.sh
Expand Down
12 changes: 12 additions & 0 deletions client-new/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
root: true,
extends: ['@react-native-community', 'plugin:prettier/recommended'],
plugins: ['prettier', 'jest'],
rules: {
'prettier/prettier': 'error',
'react/react-in-jsx-scope': 'off'
},
env: {
'jest/globals': true
}
};
9 changes: 9 additions & 0 deletions client-new/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"printWidth": 80,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "always"
}
96 changes: 70 additions & 26 deletions client-new/App.tsx
Original file line number Diff line number Diff line change
@@ -1,74 +1,118 @@
import { StatusBar } from "expo-status-bar";
import { StyleSheet, Text, View } from "react-native";
import Router from "./src/navigation/Router";
import { NativeBaseProvider, extendTheme } from "native-base";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { AuthProvider } from "./src/contexts/AuthContext";
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import Router from './src/navigation/Router';
import { NativeBaseProvider, extendTheme } from 'native-base';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { AuthProvider } from './src/contexts/AuthContext';
import {
useFonts,
DMSans_400Regular,
DMSans_400Regular_Italic,
DMSans_500Medium,
DMSans_500Medium_Italic,
DMSans_700Bold,
DMSans_700Bold_Italic,
} from "@expo-google-fonts/dm-sans";
DMSans_700Bold_Italic
} from '@expo-google-fonts/dm-sans';
import React from 'react';

import { QueryClient, QueryClientProvider } from 'react-query';

const queryClient = new QueryClient(/*{
defaultOptions: {
queries: {
refetchOnWindowFocus: false
}
}
}*/);

import {Inter_400Regular, Inter_600SemiBold } from '@expo-google-fonts/inter';


export default function App() {
const [fontsLoaded] = useFonts({

"MADE Dillan": require("./assets/fonts/MADE-Dillan.otf"),
"Roca Heavy": require("./assets/fonts/Roca-Bold.ttf"),
"Roca Light": require("./assets/fonts/Roca-Light.ttf"),
"Roca Regular": require("./assets/fonts/Roca-Regular.ttf"),

DMSans_400Regular,
DMSans_400Regular_Italic,
DMSans_500Medium,
DMSans_500Medium_Italic,
DMSans_700Bold,

DMSans_700Bold_Italic,
Inter_400Regular,
Inter_600SemiBold
});

const theme = extendTheme({
fontConfig: {
DM_Sans: {
Regular: {
normal: "DMSans_400Regular",
italic: "DMSans_400Regular_Italic",
normal: 'DMSans_400Regular',
italic: 'DMSans_400Regular_Italic'
},
Medium: {
normal: "DMSans_500Medium",
italic: "DMSans_500Medium_Italic",
normal: 'DMSans_500Medium',
italic: 'DMSans_500Medium_Italic'
},
Bold: {
normal: "DMSans_700Bold",
italic: "DMSans_700Bold_Italic",
},
},
Roca_One: {
Light: {
normal: "Roca Light",
},
Regular: {
normal: "Roca Regular",
},
Bold: {
normal: "Roca Heavy",
},
},
Inter: {
Regular: {
normal: "Inter_400Regular",
},
Bold: {
normal: "Inter_600SemiBold",
},
},
},
colors: {
deepEvergreen: "#0C362F",
muteEggplant: "#251B22",
deepEvergreen: '#0C362F',
muteEggplant: '#251B22'
},
fonts: {
madeDillan: "MADE Dillan", // access fontFamily="madeDillan"
dmSans: "DM_Sans", // access fontFamily={"dmSans"} fontWeight={"Regular"} fontStyle={"normal"}
rocaOne: "Roca_One", // access fontFamily={"rocaOne"} fontWeight={"Regular"} fontStyle={"normal"}
inter: "Inter", // access fontFamily={"inter"} fontWeight={"Regular"} fontStyle={"normal"}
},
});

return (
<AuthProvider>
<SafeAreaProvider>
<NativeBaseProvider theme={theme}>
<Router />
getUser()
</NativeBaseProvider>
</SafeAreaProvider>
</AuthProvider>
<QueryClientProvider client={queryClient}>
<AuthProvider>
<SafeAreaProvider>
<NativeBaseProvider theme={theme}>
<Router />
</NativeBaseProvider>
</SafeAreaProvider>
</AuthProvider>
</QueryClientProvider>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center'
}
});
27 changes: 27 additions & 0 deletions client-new/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Frontend Installs & Learning References


### Installations
[Installing Node](https://nodejs.org/en/download/)

[Installing the React Native Development Environment](https://reactnative.dev/docs/environment-setup)



### Learning References

#### React Native
[React Native Documentation](https://github.com/reactnative.dev/docs/getting-started)

[React Native in Action (book)](https://learning.oreilly.com/library/view/react-native-in/9781617294051/)

[Professional React Native](https://learning.oreilly.com/library/view/professional-react-native/9781800563681/)

#### TypeScript
[TypeScript Documentation](https://www.typescriptlang.org/docs/)

[TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/intro.html)

[Learning TypeScript (book)](https://learning.oreilly.com/library/view/learning-typescript/9781098110321/)

[Programming TypeScript (book)](https://learning.oreilly.com/library/view/programming-typescript/9781492037644/)
Binary file added client-new/assets/fonts/Roca-Bold.ttf
Binary file not shown.
Binary file added client-new/assets/fonts/Roca-Light.ttf
Binary file not shown.
Binary file added client-new/assets/fonts/Roca-Regular.ttf
Binary file not shown.
20 changes: 19 additions & 1 deletion client-new/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
module.exports = function(api) {
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
[
'module-resolver',
{
root: ['./src'],
alias: {
'@/components': './src/components',
'@/screens': './src/screens',
'@/utils': './src/utils',
'@/assets': './src/assets',
'@/interfaces': './src/interfaces',
'@/contexts': './src/contexts',
'@/services': './src/services',
'@/navigation': './src/navigation'
}
}
]
]
};
};
29 changes: 23 additions & 6 deletions client-new/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,39 @@
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"ts:check": "tsc"
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
"test": "jest --passWithNoTests"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"prettier --write",
"git add"
]
},
"dependencies": {
"@expo-google-fonts/dm-sans": "^0.2.3",
"@expo-google-fonts/inter": "^0.2.3",
"@react-native-community/slider": "^4.4.3",
"@react-navigation/bottom-tabs": "^6.5.11",
"@react-navigation/native": "^6.1.8",
"@react-navigation/native-stack": "^6.9.14",
"@ronradtke/react-native-markdown-display": "^8.0.0",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@types/react-native": "^0.72.3",
"axios": "^1.6.0",
"expo": "~49.0.13",
"expo-dev-client": "^2.4.11",
"expo-font": "^11.6.0",
"expo-font": "~11.4.0",
"expo-secure-store": "^12.5.0",
"expo-status-bar": "~1.6.0",
"firebase": "^10.5.0",
Expand All @@ -35,11 +51,12 @@
"react-native-safe-area-context": "^4.7.2",
"react-native-screens": "^3.25.0",
"react-native-svg": "^13.14.0",
"react-native-vector-icons": "^10.0.0"
"react-native-vector-icons": "^10.0.0",
"react-query": "^3.39.3"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"typescript": "^5.1.3"
},
"private": true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { View, Text } from 'native-base';

type HSGCProps = {
title: string;
description: string;
};

const HomeScreenGuideCard: React.FC<HSGCProps> = (props) => {
return (
<View
style={{
paddingLeft: 20,
paddingRight: 20,
paddingTop: 16,
paddingBottom: 16,
backgroundColor: '#FFB017',
borderRadius: 13,
borderWidth: 1,
borderColor: '#0F4D3F',
flexDirection: 'row',
alignItems: 'center',
marginBottom: 16,
}}
>
<View style={{ flex: 1, marginLeft: 5, marginRight: 5 }}>
<Text style={{ fontFamily: 'inter', fontSize: 15, fontWeight: '600', marginBottom: 8 }}>{props.title}</Text>
<Text style={{ fontFamily: 'inter', fontSize: 12, color: '#2F1D12', marginBottom: 8, width: 100 }} numberOfLines={2}>
{props.description}
</Text>
</View>
</View>
);
};

export default HomeScreenGuideCard;
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from "react";
import { View, Text, ScrollView } from "native-base"; // Import NativeBase components
import HomeScreenGuideCard from "./HomeScreenGuideCard";

type GuidesProps = {
guides: {
title: string;
description: string;
}[];
};

const GuidesComponent: React.FC<GuidesProps> = ({ guides }) => {
return (
<ScrollView horizontal showsHorizontalScrollIndicator={false} mt={5}>
{guides.map((item, index) => (
<View key={index} marginRight={5}>
<HomeScreenGuideCard title={item.title} description={item.description} />
</View>
))}
</ScrollView>
);
};

export default GuidesComponent;
Loading

0 comments on commit 3d3dc01

Please sign in to comment.