Commit 98f2604d authored by Gayath's avatar Gayath

Dashboard layout init

parent 050d69a9
...@@ -23,20 +23,26 @@ export default function App(props) { ...@@ -23,20 +23,26 @@ export default function App(props) {
// Ignore firebase v9 AsyncStorage warning // Ignore firebase v9 AsyncStorage warning
React.useEffect(() => { React.useEffect(() => {
loadFonts(); async function loadFonts() {
LogBox.ignoreLogs([ await Font.loadAsync({
"AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. See https://github.com/react-native-async-storage/async-storage", SFPRODISPLAYBOLD: require('./assets/fonts/SFPRODISPLAYBOLD.otf'),
]); });
setIsReady(true);
}
// LogBox.ignoreLogs([
// "AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. See https://github.com/react-native-async-storage/async-storage",
// ]);
}, []); }, []);
async function loadFonts() { // async function loadFonts() {
await Font.loadAsync({ // await Font.loadAsync({
SFPRODISPLAYBOLD: require('./assets/fonts/SFPRODISPLAYBOLD.otf'), // SFPRODISPLAYBOLD: require('./assets/fonts/SFPRODISPLAYBOLD.otf'),
}); // });
setIsReady(true); // setIsReady(true);
} // }
// if (!isReady) { // if (!isReady) {
// return <AppLoading></AppLoading>; // return <AppLoading></AppLoading>;
......
This diff is collapsed.
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"@expo/vector-icons": "^12.0.0", "@expo/vector-icons": "^12.0.0",
"@react-navigation/native": "^6.0.6", "@react-navigation/native": "^6.0.6",
"@react-navigation/native-stack": "^6.2.5", "@react-navigation/native-stack": "^6.2.5",
"expo": "~44.0.0", "expo": "^44.0.6",
"expo-asset": "~8.4.6", "expo-asset": "~8.4.6",
"expo-font": "~10.0.4", "expo-font": "~10.0.4",
"expo-status-bar": "~1.2.0", "expo-status-bar": "~1.2.0",
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
"react-native-web": "0.17.1" "react-native-web": "0.17.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.12.9" "@babel/core": "^7.12.9",
"prettier": "2.6.0"
}, },
"private": true "private": true
} }
import React from "react"; import React from "react";
import { View, Linking } from "react-native"; import { View, Linking, Card } from "react-native";
import { getAuth, signOut } from "firebase/auth"; import { getAuth, signOut } from "firebase/auth";
import { import {
Layout, Layout,
...@@ -20,6 +20,11 @@ export default function ({ navigation }) { ...@@ -20,6 +20,11 @@ export default function ({ navigation }) {
<Layout> <Layout>
<TopNav <TopNav
middleContent="Home" middleContent="Home"
leftContent={<Ionicons
name={isDarkmode ? "sunny" : "moon"}
size={20}
color={isDarkmode ? themeColor.white100 : themeColor.dark}
/>}
rightContent={ rightContent={
<Ionicons <Ionicons
name={isDarkmode ? "sunny" : "moon"} name={isDarkmode ? "sunny" : "moon"}
...@@ -27,6 +32,7 @@ export default function ({ navigation }) { ...@@ -27,6 +32,7 @@ export default function ({ navigation }) {
color={isDarkmode ? themeColor.white100 : themeColor.dark} color={isDarkmode ? themeColor.white100 : themeColor.dark}
/> />
} }
rightAction={() => { rightAction={() => {
if (isDarkmode) { if (isDarkmode) {
setTheme("light"); setTheme("light");
...@@ -45,7 +51,7 @@ export default function ({ navigation }) { ...@@ -45,7 +51,7 @@ export default function ({ navigation }) {
<Section style={{ marginTop: 20 }}> <Section style={{ marginTop: 20 }}>
<SectionContent> <SectionContent>
<Text fontWeight="bold" style={{ textAlign: "center" }}> <Text fontWeight="bold" style={{ textAlign: "center" }}>
These UI components provided by Rapi UI These UI components provided by Rapi UI
</Text> </Text>
<Button <Button
style={{ marginTop: 10 }} style={{ marginTop: 10 }}
...@@ -74,6 +80,7 @@ export default function ({ navigation }) { ...@@ -74,6 +80,7 @@ export default function ({ navigation }) {
/> />
</SectionContent> </SectionContent>
</Section> </Section>
</View> </View>
</Layout> </Layout>
); );
......
...@@ -5,6 +5,8 @@ import { ...@@ -5,6 +5,8 @@ import {
TopNav, TopNav,
Text, Text,
themeColor, themeColor,
Section,
SectionContent,
useTheme, useTheme,
} from "react-native-rapi-ui"; } from "react-native-rapi-ui";
import { Ionicons } from "@expo/vector-icons"; import { Ionicons } from "@expo/vector-icons";
...@@ -38,15 +40,25 @@ export default function ({ navigation }) { ...@@ -38,15 +40,25 @@ export default function ({ navigation }) {
} }
}} }}
/> />
<View <View style={{flex: 1, flexDirection: 'row',alignItems: "center",justifyContent:"center"}}>
style={{
flex: 1,
alignItems: "center", <View style={{flex: 1, margin:10 }} >
justifyContent: "center", <Section >
}} <SectionContent>
> {/* This text using ubuntu font */}
{/* This text using ubuntu font */} <Text fontWeight="bold">This is the second screen</Text>
<Text fontWeight="bold">This is the second screen</Text> </SectionContent>
</Section>
</View>
<View style={{flex: 1,margin:10}} >
<Section >
<SectionContent>
{/* This text using ubuntu font */}
<Text fontWeight="bold">This is the second screen</Text>
</SectionContent>
</Section>
</View>
</View> </View>
</Layout> </Layout>
); );
......
...@@ -76,6 +76,7 @@ export default function ({ navigation }) { ...@@ -76,6 +76,7 @@ export default function ({ navigation }) {
style={{ style={{
fontFamily: 'SFPRODISPLAYBOLD', fontFamily: 'SFPRODISPLAYBOLD',
fontSize:30, fontSize:30,
fontWeight:"bold",
alignSelf: "center", alignSelf: "center",
padding: 30, padding: 30,
color: isDarkmode ? "#FFFFFF" : "#000000", color: isDarkmode ? "#FFFFFF" : "#000000",
......
...@@ -76,6 +76,7 @@ export default function ({ navigation }) { ...@@ -76,6 +76,7 @@ export default function ({ navigation }) {
style={{ style={{
alignSelf: "center", alignSelf: "center",
padding: 30, padding: 30,
fontWeight:"bold"
}} }}
> >
Register Register
...@@ -133,6 +134,7 @@ export default function ({ navigation }) { ...@@ -133,6 +134,7 @@ export default function ({ navigation }) {
fontWeight="bold" fontWeight="bold"
style={{ style={{
marginLeft: 5, marginLeft: 5,
fontWeight:"bold"
}} }}
> >
Login here Login here
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment