- login api (that should return token if succeed)
- create user (also returns token)
- get all bootcamps (return bootcamps if the user has not made any choice on them)
| import {useState} from 'react'; | |
| import { | |
| View, | |
| Text, | |
| LayoutAnimation, | |
| Image, | |
| Pressable, | |
| Platform, | |
| UIManager, | |
| } from 'react-native'; |
| import {useState, useRef} from 'react'; | |
| import { | |
| View, | |
| Image, | |
| FlatList, | |
| StyleSheet, | |
| useWindowDimensions, | |
| ViewabilityConfig, | |
| ViewToken, | |
| } from 'react-native'; |
| const downloadFile = () => { | |
| const source = "https://www.africau.edu/images/default/sample.pdf"; | |
| let dirs = ReactNativeBlobUtil.fs.dirs; | |
| ReactNativeBlobUtil.config({ | |
| fileCache: true, | |
| appendExt: 'pdf', | |
| path: `${dirs.DocumentDir}/${fileName}`, | |
| addAndroidDownloads: { | |
| useDownloadManager: true, | |
| notification: true, |
| /* | |
| This is our tab buttons, when the user press on the tab buttons | |
| we first scroll to that index, then we set the tab active | |
| */ | |
| <TouchableOpacity | |
| onPress={() => { | |
| listRef.current.scrollToIndex({ | |
| animated: true, | |
| viewOffset: 50 * index, |
| /* | |
| we change the index when user swipes the carousel | |
| we also make the tab category active if the items category is changed while swiping | |
| */ | |
| const onChangeIndex = (index) => { | |
| setIndex(index); | |
| if(DATA[index].category !== activeTab) { | |
| setActiveTab(DATA[index].category); | |
| } | |
| } |
| //DUMMY DATA | |
| const DATA = [ | |
| { | |
| category: "Home & Living", | |
| image: require('./assets/f1.jpg') | |
| }, | |
| { | |
| category: "Home & Living", | |
| image: require('./assets/f2.jpg') | |
| }, |
| import * as React from 'react'; | |
| import { Text, View, StyleSheet, FlatList, Dimensions } from 'react-native'; | |
| import { Card } from 'react-native-paper'; | |
| const { width, height } = Dimensions.get('window'); | |
| const Metrics = { | |
| section: 16, | |
| halfSection: 8, | |
| }; |
| public class QTest | |
| { | |
| public static void main (String[] args) | |
| { | |
| int x = 38; | |
| int y = 10; | |
| System.out.println(x+y); | |
| } | |
| } |
| buttonContainer: { | |
| flexDirection: 'row', | |
| justifyContent: 'space-between', | |
| alignItems: 'center', | |
| marginBottom: 30, | |
| }, | |
| circle: { | |
| height: 20, | |
| width: 20, | |
| borderRadius: 10, |