Skip to content

Commit

Permalink
FIX: Missing titles
Browse files Browse the repository at this point in the history
Adding missing titles do screens Add Card and Card List
  • Loading branch information
diogosilverio committed Jan 28, 2018
1 parent f993a01 commit e8f04fd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions components/flashcards/AddCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ import { COLOR_WHITE, COLOR_B_5 } from '../../utils/colors';

class AddCard extends Component {

static navigationOptions = ({ navigation }) => {
const { deckKey } = navigation.state.params;

return {
title: `Adding Card to '${deckKey}' Deck`,
}
}

state = {
card: {
question: '',
Expand Down
10 changes: 9 additions & 1 deletion components/flashcards/CardList.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,19 @@ import { COLOR_B_4, COLOR_A_1 } from '../../utils/colors';

class CardList extends Component {

static navigationOptions = ({ navigation }) => {
const { deckKey } = navigation.state.params;

return {
title: `'${deckKey}' Cards`,
}
}

render() {
const { cards, navigation } = this.props;
const { deckKey, refresher } = this.props.navigation.state.params;

const doubleRefresher = () =>{
const doubleRefresher = () => {
this.setState({});
refresher();
}
Expand Down

0 comments on commit e8f04fd

Please sign in to comment.