Skip to content

Commit

Permalink
feat: add on boarding screeens
Browse files Browse the repository at this point in the history
  • Loading branch information
geeekgod committed Sep 24, 2022
1 parent f76673a commit 2b53228
Show file tree
Hide file tree
Showing 35 changed files with 991 additions and 23 deletions.
112 changes: 105 additions & 7 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,113 @@
import React from "react";
import { NativeBaseProvider, Box } from "native-base";
import { StatusBar } from "react-native";
import React, { useCallback, useEffect, useState } from "react";
import { NativeBaseProvider, Box, extendTheme } from "native-base";
import { StatusBar, View } from "react-native";
import "react-native-gesture-handler";
import StackNavigator from "./app/navigation/StackNavigator";
import { NavigationContainer } from '@react-navigation/native';
import AppLoading from 'expo-app-loading';
import * as SplashScreen from 'expo-splash-screen';
import useFont from "./app/hooks/useFont";


export default function App() {

const [appIsReady, setAppIsReady] = useState(false);
const defaultTheme = extendTheme();
const [theme, setTheme] = useState(defaultTheme);

useEffect(() => {
async function prepare() {
try {
await SplashScreen.preventAutoHideAsync();
await useFont();
} catch (e) {
console.warn(e);
} finally {
setAppIsReady(true);
}
}

prepare();
}, []);

const onLayoutRootView = useCallback(async () => {
if (appIsReady) {
const theme = extendTheme({
colors: {
primary: {
50: "#DE2A26",
100: '#DE2A26',
200: '#DE2A26',
300: '#DE2A26',
400: '#DE2A26',
500: '#DE2A26',
600: '#DE2A26',
700: '#DE2A26',
800: '#DE2A26',
900: '#DE2A26',
}
},
fontConfig: {
Poppins: {
100: {
normal: "Poppins-Light",
italic: "Poppins-LightItalic",
},
200: {
normal: "Poppins-Light",
italic: "Poppins-LightItalic",
},
300: {
normal: "Poppins-Light",
italic: "Poppins-LightItalic",
},
400: {
normal: "Poppins-Regular",
},
500: {
normal: "Poppins-Medium",
},
600: {
normal: "Poppins-Medium",
italic: "Poppins-MediumItalic",
},
700: {
normal: 'Poppins-Bold',
},
800: {
normal: 'Poppins-Bold',
italic: 'Poppins-BoldItalic',
},
900: {
normal: 'Poppins-Bold',
italic: 'Poppins-BoldItalic',
},
},
},

fonts: {
heading: "Poppins",
body: "Poppins",
mono: "Poppins",
},
});
setTheme(theme);
await SplashScreen.hideAsync();
}
}, [appIsReady]);

if (!appIsReady) {
return null;
}

return (
<NativeBaseProvider>
<StatusBar barStyle="dark-content" />
<StackNavigator />
</NativeBaseProvider>
<View style={{ flex: 1 }} onLayout={onLayoutRootView}>
<NativeBaseProvider theme={theme}>
<NavigationContainer>
<StatusBar barStyle={"default"} />
<StackNavigator />
</NavigationContainer>
</NativeBaseProvider>
</View>
);
}
5 changes: 4 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
},
"web": {
"favicon": "./assets/favicon.png"
},
"packagerOpts": {
"config": "metro.config.js"
}
}
}
}
Binary file added app/assets/fonts/Poppins-Black.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-BlackItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-Bold.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-BoldItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-ExtraBold.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-ExtraBoldItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-ExtraLight.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-ExtraLightItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-Italic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-Light.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-LightItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-Medium.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-MediumItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-Regular.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-SemiBold.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-SemiBoldItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-Thin.ttf
Binary file not shown.
Binary file added app/assets/fonts/Poppins-ThinItalic.ttf
Binary file not shown.
44 changes: 44 additions & 0 deletions app/assets/svg/walkthrough/walkthrough1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions app/assets/svg/walkthrough/walkthrough2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2b53228

Please sign in to comment.