-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* create basic components * fix: replace <Text/> by typography components * fix: move countdown component * fix typo + android app icon update * update android application icon * fea: add Link * fix: use link * feat: here are the cards * feat: maps component + collapsable * feat: progress + hoc withValidEntities * feat: progress + hoc withValidEntities * fix: remove empty useless styles * update ios icon set. * rename function parameter * rename components and directories * rename selectors * code clean-up * move logic to selector * fix proptypes checking issues * minor style fix (color)
- Loading branch information
1 parent
2d1c838
commit c720645
Showing
84 changed files
with
1,246 additions
and
846 deletions.
There are no files selected for viewing
Binary file modified
BIN
-16.2 KB
(29%)
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-16 KB
(18%)
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-16.9 KB
(35%)
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-7.34 KB
(75%)
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React, { Component } from "react"; | ||
import PropTypes from "prop-types"; | ||
import { Card as NativeCard } from "react-native-elements"; | ||
|
||
import styles from "./styles"; | ||
|
||
export default class Card extends Component { | ||
static propTypes = { | ||
title: NativeCard.propTypes.title, | ||
children: PropTypes.node, | ||
image: NativeCard.propTypes.image | ||
}; | ||
|
||
static defaultProps = { | ||
title: null, | ||
list: [], | ||
children: null, | ||
image: null | ||
}; | ||
|
||
render() { | ||
return ( | ||
<NativeCard | ||
dividerStyle={styles.dividerStyle} | ||
containerStyle={styles.containerCardStyle} | ||
titleStyle={styles.card} | ||
image={this.props.image} | ||
title={this.props.title} | ||
> | ||
{this.props.children} | ||
</NativeCard> | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { StyleSheet } from "react-native"; | ||
|
||
import theme from "../../../theme/theme"; | ||
|
||
export default StyleSheet.create({ | ||
containerCardStyle: { | ||
padding: 15, | ||
marginTop: 15, | ||
marginLeft: 0, | ||
marginRight: 0, | ||
borderWidth: 0 | ||
}, | ||
dividerStyle: { | ||
marginLeft: 0, | ||
marginRight: 0 | ||
}, | ||
card: { | ||
color: theme.PrimaryTextColor | ||
} | ||
}); |
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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React, { Component } from "react"; | ||
import PropTypes from "prop-types"; | ||
import { Circle } from "react-native-progress"; | ||
|
||
import theme from "../../../theme/theme"; | ||
|
||
export default class Progress extends Component { | ||
static propTypes = { | ||
progress: PropTypes.number | ||
}; | ||
|
||
static defaultProps = { | ||
progress: NaN | ||
}; | ||
|
||
render() { | ||
return ( | ||
<Circle | ||
animated | ||
progress={this.props.progress || 0} | ||
indeterminate={isNaN(this.props.progress)} | ||
showsText | ||
size={200} | ||
color={theme.BackgroundTextColor} | ||
borderColor={theme.BackgroundTextColor} | ||
unifiledColor="#559988" | ||
/> | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
here you will find component reusable in others projects | ||
|
||
# Components we may need | ||
* Paper | ||
* Alerts | ||
* Badge | ||
* Buttons | ||
* Button group | ||
* Card | ||
* Carousel | ||
* Dropdowns | ||
* Forms | ||
** radio | ||
** checkbox | ||
** input, | ||
** combo/picker | ||
* Modal | ||
* Menu | ||
* Progress | ||
|
||
### Common Props to consider | ||
* mode [primary,secondary,danger,....] | ||
* size [small, normal, big, ...] | ||
* elevation [0,1,2, more???..;] |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
here you will find component reusable to positione component | ||
|
||
# Components we may need | ||
todo | ||
|
||
### Common Props to consider | ||
* mode [primary,secondary,danger,....] | ||
* size [small, normal, big, ...] | ||
* elevation [0,1,2, more???..;] |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React, { Component } from "react"; | ||
import PropTypes from "prop-types"; | ||
|
||
import Paragraph from "../../../components/typography/paragraph/Paragraph"; | ||
import Card from "../../common/card/Card"; | ||
|
||
export default class AthleteCard extends Component { | ||
static propTypes = { | ||
athlete: PropTypes.shape({ | ||
firstname: PropTypes.string, | ||
lastname: PropTypes.string, | ||
profil: PropTypes.string | ||
}).isRequired | ||
}; | ||
|
||
render() { | ||
const { athlete } = this.props; | ||
return ( | ||
<Card title="ATHLETE" image={{ uri: athlete.profile }}> | ||
<Paragraph> | ||
Anything you need to know about {athlete.firstname} {athlete.lastname}. | ||
performance, data, predictions and much more! | ||
</Paragraph> | ||
</Card> | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React, { Component } from "react"; | ||
import PropTypes from "prop-types"; | ||
|
||
import CardList from "../../common/cardList/CardList"; | ||
import { getIconName } from "../../../routes/main/clubFeed/helper"; | ||
import theme from "../../../theme/theme"; | ||
|
||
export default class AthleteDetailsCard extends Component { | ||
// ToDO fix shape | ||
static propTypes = { | ||
rendered: PropTypes.bool, | ||
athlete: PropTypes.shape({ | ||
firstname: PropTypes.string, | ||
lastname: PropTypes.string, | ||
profil: PropTypes.string | ||
}).isRequired | ||
}; | ||
|
||
static defaultProps = { | ||
rendered: true | ||
}; | ||
|
||
render() { | ||
const { athlete } = this.props; | ||
if (!this.props.rendered) return false; | ||
|
||
return ( | ||
<CardList | ||
title={"DETAILS"} | ||
list={athlete.performance.details.map((detail, index) => ({ | ||
key: index, | ||
image: { | ||
name: getIconName(detail.name), | ||
color: theme.PrimaryColor | ||
}, | ||
text: `${detail.value} ${detail.unit !== undefined | ||
? detail.unit | ||
: ""}` | ||
}))} | ||
/> | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React, { Component } from "react"; | ||
import PropTypes from "prop-types"; | ||
|
||
import CardList from "../../common/cardList/CardList"; | ||
|
||
export default class ClubActivitiesCard extends Component { | ||
static propTypes = { | ||
activities: PropTypes.arrayOf( | ||
PropTypes.shape({ | ||
type: PropTypes.string | ||
}) | ||
).isRequired | ||
}; | ||
|
||
render() { | ||
const { activities } = this.props; | ||
return ( | ||
<CardList | ||
title={"ACTIVITIES"} | ||
list={activities.map((activity, index) => ({ | ||
key: index, | ||
image: activity.athlete.profile, | ||
text: activity.name | ||
}))} | ||
/> | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React, { Component } from "react"; | ||
import PropTypes from "prop-types"; | ||
|
||
import CardList from "../../common/cardList/CardList"; | ||
import { getIconName } from "../../../routes/main/clubFeed/helper"; | ||
import theme from "../../../theme/theme"; | ||
|
||
export default class ClubAwardsCard extends Component { | ||
static propTypes = { | ||
club: PropTypes.shape({ | ||
id: PropTypes.number, | ||
name: PropTypes.string, | ||
city: PropTypes.string, | ||
members: PropTypes.array, | ||
cover_photo: PropTypes.string, | ||
url: PropTypes.string | ||
}).isRequired | ||
}; | ||
|
||
render() { | ||
const { club } = this.props; | ||
return ( | ||
<CardList | ||
title={"AWARDS"} | ||
list={Object.entries(club.ranking).map(([key, value]) => ({ | ||
key, | ||
image: { name: getIconName(key), color: theme.PrimaryColor }, | ||
text: value.athlete | ||
}))} | ||
/> | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React, { Component } from "react"; | ||
import PropTypes from "prop-types"; | ||
|
||
import Paragraph from "../../../components/typography/paragraph/Paragraph"; | ||
import Card from "../../common/card/Card"; | ||
|
||
export default class ClubCard extends Component { | ||
static propTypes = { | ||
club: PropTypes.shape({ | ||
id: PropTypes.number, | ||
name: PropTypes.string, | ||
city: PropTypes.string, | ||
members: PropTypes.array, | ||
cover_photo: PropTypes.string, | ||
url: PropTypes.string | ||
}).isRequired | ||
}; | ||
|
||
render() { | ||
const { club } = this.props; | ||
return ( | ||
<Card title="LYBITOS" image={{ uri: club.cover_photo }}> | ||
<Paragraph> | ||
Please find below anything related to Lybitos club: leaks, gossips and | ||
much more! | ||
</Paragraph> | ||
</Card> | ||
); | ||
} | ||
} |
Oops, something went wrong.