Skip to content

Commit

Permalink
develop contribution section in project page anitab-org#80
Browse files Browse the repository at this point in the history
  • Loading branch information
Bucky25 committed Dec 6, 2020
1 parent 1c7ef02 commit ea584eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/Components/Projects/Contribution/ContributionRow.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { View, Text, StyleSheet, processColor } from 'react-native';
import { View, Text, StyleSheet } from 'react-native';
import ContributionBox from './Box';

class ContributionRow extends React.Component {
Expand All @@ -8,6 +8,7 @@ class ContributionRow extends React.Component {
super(props);
this.state = {data: null}
}

componentDidMount(){
const endpoint = this.props.po.link;
const headers = {
Expand All @@ -20,8 +21,10 @@ class ContributionRow extends React.Component {
.then((resp) => resp.json())
.then((js) => this.setState({data: js}));
}

render() {
var Contributionrow = [];

const take = () =>{
Contributionrow.push(<Text style={styles.desc}>{this.props.po.name}</Text>);
var week = 0;
Expand All @@ -40,7 +43,9 @@ class ContributionRow extends React.Component {
}
return null;
}

return (

<View>
{this.state.data === null ?
<Text style={styles.desc}>loading...</Text>
Expand All @@ -55,6 +60,7 @@ class ContributionRow extends React.Component {
</View>
}
</View>

);
}
};
Expand Down
3 changes: 2 additions & 1 deletion src/Components/Projects/Contribution/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { View, StyleSheet, Text } from 'react-native';
import SectionHeader from './../../SectionHeader';
import ContributionRow from './ContributionRow';
import ContributionBox from './Box';

const data = [
{
name : 'Anitab-org.github.io',
Expand Down Expand Up @@ -67,7 +68,7 @@ const styles = StyleSheet.create({
fontSize: 12,
fontWeight: '400',
padding: 5
}
},
});

export default Contribution;

0 comments on commit ea584eb

Please sign in to comment.