From e8f04fd076d16de16ae3a03b4cb4bd59fdce5019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diogo=20Silv=C3=A9rio?= Date: Sun, 28 Jan 2018 12:31:31 -0200 Subject: [PATCH] FIX: Missing titles Adding missing titles do screens Add Card and Card List --- components/flashcards/AddCard.js | 8 ++++++++ components/flashcards/CardList.js | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/components/flashcards/AddCard.js b/components/flashcards/AddCard.js index 52397b4..b3c391f 100644 --- a/components/flashcards/AddCard.js +++ b/components/flashcards/AddCard.js @@ -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: '', diff --git a/components/flashcards/CardList.js b/components/flashcards/CardList.js index 90a94e0..879b847 100644 --- a/components/flashcards/CardList.js +++ b/components/flashcards/CardList.js @@ -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(); }