|
|
|
@ -13,54 +13,6 @@ import firestore from '@react-native-firebase/firestore';
@@ -13,54 +13,6 @@ import firestore from '@react-native-firebase/firestore';
|
|
|
|
|
const Stack = createNativeStackNavigator(); |
|
|
|
|
export const OnboardingGroup: FC = () => { |
|
|
|
|
|
|
|
|
|
// const fetchAllItems = async () => {
|
|
|
|
|
// try {
|
|
|
|
|
// AsyncStorage.clear();
|
|
|
|
|
// const keys = await AsyncStorage.getAllKeys()
|
|
|
|
|
// const items = await AsyncStorage.multiGet(keys)
|
|
|
|
|
// return items
|
|
|
|
|
// } catch (error) {
|
|
|
|
|
// console.log(error, "problemo")
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// fetchAllItems()
|
|
|
|
|
|
|
|
|
|
const submitPost = async () => { |
|
|
|
|
firestore() |
|
|
|
|
.collection('GameItems') |
|
|
|
|
.add({ |
|
|
|
|
id: 6, |
|
|
|
|
isDare: true, |
|
|
|
|
en: 'Dare 3', |
|
|
|
|
ua: 'Дія 3', |
|
|
|
|
hi: 'हिम्मत 3' |
|
|
|
|
}) |
|
|
|
|
.then(() => {}) |
|
|
|
|
.catch(error => console.log('Error in firebase')); |
|
|
|
|
}; |
|
|
|
|
// submitPost();
|
|
|
|
|
|
|
|
|
|
const fetchPosts = async () => { |
|
|
|
|
try { |
|
|
|
|
firestore() |
|
|
|
|
.collection('GameItems') |
|
|
|
|
.get() |
|
|
|
|
.then((querySnapshot) => { |
|
|
|
|
querySnapshot.forEach(doc => { |
|
|
|
|
const item = doc.data(); |
|
|
|
|
console.log(item); |
|
|
|
|
}) |
|
|
|
|
}).catch((error) => { |
|
|
|
|
console.log('Error in fetch: ', error); |
|
|
|
|
}) |
|
|
|
|
} catch(error) { |
|
|
|
|
console.log('Error in fetch: ', error); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// fetchPosts();
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<Stack.Navigator |
|
|
|
|
screenOptions={{ |
|
|
|
@ -68,7 +20,7 @@ export const OnboardingGroup: FC = () => {
@@ -68,7 +20,7 @@ export const OnboardingGroup: FC = () => {
|
|
|
|
|
animation: 'slide_from_left', |
|
|
|
|
|
|
|
|
|
}} |
|
|
|
|
initialRouteName={RouteKey.Loading}> |
|
|
|
|
initialRouteName={RouteKey.LanguageSelect}> |
|
|
|
|
<Stack.Screen name={RouteKey.Questions} component={Questions} /> |
|
|
|
|
<Stack.Screen name={RouteKey.Package} component={Game} /> |
|
|
|
|
<Stack.Screen name={RouteKey.Onboarding} component={Onboarding} /> |
|
|
|
|