-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from AnshMehta1/main
added filter based on category, improved CSS
- Loading branch information
Showing
7 changed files
with
265 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,70 @@ | ||
import {StyleSheet} from "react-native" | ||
import { StyleSheet } from "react-native" | ||
import Tab_one from "./tab_one"; | ||
import AddQuestion from "./addQuestion"; | ||
import { createNativeStackNavigator } from '@react-navigation/native-stack' | ||
import { NavigationContainer } from '@react-navigation/native' | ||
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; | ||
import User from "./user"; | ||
import User_helper from "./user_helper"; | ||
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs' | ||
import User from "./user" | ||
import User_helper from "./user_helper" | ||
|
||
const Stack = createNativeStackNavigator(); | ||
const User_Stack = createNativeStackNavigator(); | ||
|
||
const Tab = createBottomTabNavigator(); | ||
|
||
const Question_One_Tab = ({navigation})=>{ | ||
const Question_One_Tab = ({ navigation }) => { | ||
return ( | ||
<NavigationContainer style={styles.container} independent={true}> | ||
<Stack.Navigator initialRouteName="Tab_one"> | ||
<Stack.Screen name="Tab_one" component={Tab_one} options={{ headerShown: false }}/> | ||
<Stack.Screen name = "AddQuestion" component={AddQuestion}/> | ||
<Stack.Navigator initialRouteName="Single Correct MCQs" screenOptions={{ | ||
|
||
headerTitleStyle: { | ||
fontSize: 22, | ||
color: '#000000' | ||
}, | ||
|
||
headerTitleAlign: 'center' | ||
|
||
}}> | ||
<Stack.Screen name="Single Correct MCQs" component={Tab_one} options={{ headerShown: true }} /> | ||
<Stack.Screen name="Add Question" component={AddQuestion} options={{ headerShown: true }} /> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
) | ||
} | ||
|
||
const User_Tab = ({navigation})=>{ | ||
const User_Tab = ({ navigation }) => { | ||
return ( | ||
<NavigationContainer style={styles.container} independent={true}> | ||
<User_Stack.Navigator initialRouteName="User"> | ||
<User_Stack.Screen name="User" component={User}/> | ||
<User_Stack.Screen name = "User_helper" component={User_helper}/> | ||
<User_Stack.Navigator initialRouteName="User Profile" screenOptions={{ | ||
|
||
headerTitleStyle: { | ||
fontSize: 22, | ||
color: '#000000' | ||
}, | ||
|
||
headerTitleAlign: 'center' | ||
|
||
}}> | ||
<User_Stack.Screen name="User Profile" component={User} options={{ headerShown: true }} /> | ||
<User_Stack.Screen name="User_helper" component={User_helper} options={{ headerShown: true }} /> | ||
</User_Stack.Navigator> | ||
</NavigationContainer> | ||
) | ||
} | ||
|
||
export default function Home({navigation}){ | ||
return( | ||
export default function Home({ navigation }) { | ||
return ( | ||
<NavigationContainer independent={true}> | ||
<Tab.Navigator> | ||
<Tab.Screen name="Question_One_Tab" component={Question_One_Tab} /> | ||
<Tab.Screen name="User" component={User_Tab} options={{ headerShown: false }}/> | ||
<Tab.Screen name="Question_One_Tab" component={Question_One_Tab} options={{ headerShown: false }} /> | ||
<Tab.Screen name="User" component={User_Tab} options={{ headerShown: false }} /> | ||
</Tab.Navigator> | ||
</NavigationContainer> | ||
|
||
) | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1 | ||
}, | ||
}); | ||
flex: 1 | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.