Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Syamlal CM syamjayaraj

🎯
Focusing
Block or report user

Report or block syamjayaraj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View App.js
render() {
return (
<Container>
<Header androidStatusBarColor="#af1313" style={{ backgroundColor: '#d11919' }}>
<Body style = {{ flex: 1, flexDirection: 'column', justifyContent: 'center', alignItems: 'center', }}>
<Title>BLOOD DONORS</Title>
</Body>
</Header>
View App.js
_toggleDonorPost(){
this.setState({
isSubmited: false
})
}
View App.js
onValueChange2(value) {
this.setState({
grouptoBeFiltered: value
});
}
View App.js
onValueChange(value) {
this.setState({
group: value
});
}
View App.js
addDonor = (name, mobile, group) => {
if(this.state.name != null && this.state.mobile != null && this.state.group != null){
fetch('https://blood-donors-db.firebaseio.com/donors.json', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": name,
View App.js
componentDidMount() {
this.timer=setInterval(() =>this.getDonor(), 1000);
}
async getDonor() {
return fetch(`https://blood-donors-db.firebaseio.com/donors.json`)
.then((response) => response.json())
.then((responseJson) => {
this.setState({
donors: Object.values(responseJson),
View App.js
constructor(props) {
super(props);
this.state = {
isSubmited: false,
name: null,
mobile: null,
group: null,
donors: [],
grouptoBeFiltered: null,
};
View App.js
export default class App extends Component {
}
View App.js
import React, { Component } from "react";
import { TouchableOpacity, StyleSheet, Alert, Picker } from 'react-native';
import { Container, View, Header, Content, Text, Left, Right, Body, Title, Item, Input, Button, List, ListItem, } from "native-base";
import Communications from 'react-native-communications';
View App.js
export default class FAB extends Component {
...
...
render() {
const { data } = this.state;
return (
<View style={styles.container}>
...
...
You can’t perform that action at this time.