From 19d6e35f15c0b9e6491e9b0d9fb2e21d3563a4d1 Mon Sep 17 00:00:00 2001 From: appear Date: Sat, 22 Feb 2020 22:17:04 +0900 Subject: [PATCH] remove unused import, values --- src/bestsellers/BookItem.js | 2 +- src/bestsellers/BookList.js | 2 +- src/bestsellers/BookSectionList.js | 48 ++++++++----------- src/bestsellers/MockBookList.js | 8 ++-- src/bestsellers/NYT.js | 2 +- src/bestsellers/index.js | 3 -- src/depends/index.js | 2 +- .../components/DeckScreen/Deck.js | 2 - .../components/DeckScreen/DeckCreation.js | 11 +++-- .../components/HeadingText.js | 2 +- .../src_checkpoint_01/components/Input.js | 2 +- .../components/NewCardScreen/index.js | 2 - .../components/NormalText.js | 4 +- .../components/ReviewScreen/ReviewButtons.js | 7 +-- .../components/ReviewScreen/ReviewSummary.js | 6 +-- .../src_checkpoint_02/components/Button.js | 2 +- .../components/DeckScreen/Deck.js | 1 - .../components/DeckScreen/DeckCreation.js | 9 ++-- .../components/Flashcards.js | 3 +- .../components/HeadingText.js | 2 +- .../src_checkpoint_02/components/Input.js | 2 +- .../components/NewCardScreen/index.js | 2 - .../components/NormalText.js | 4 +- .../src_checkpoint_03/components/Button.js | 2 +- .../components/DeckScreen/Deck.js | 1 - .../components/DeckScreen/DeckCreation.js | 9 ++-- .../components/Flashcards.js | 1 - .../components/HeadingText.js | 2 +- .../src_checkpoint_03/components/Input.js | 2 +- .../components/NewCardScreen/index.js | 1 - .../components/NormalText.js | 4 +- .../components/ReviewScreen/ReviewButtons.js | 7 +-- .../components/ReviewScreen/ReviewSummary.js | 6 +-- .../components/ReviewScreen/index.js | 8 +--- .../src_checkpoint_03/reducers/index.js | 2 +- .../src_checkpoint_04/components/Button.js | 2 +- .../components/Flashcards.js | 1 - .../components/HeadingText.js | 2 +- .../src_checkpoint_04/components/Input.js | 2 +- .../components/NewCardScreen/index.js | 1 - .../components/NormalText.js | 4 +- .../components/ReviewScreen/ReviewButtons.js | 7 +-- .../components/ReviewScreen/ReviewSummary.js | 6 +-- .../components/ReviewScreen/index.js | 8 +--- .../src_checkpoint_04/reducers/decks.js | 2 - .../src_checkpoint_04/reducers/index.js | 2 +- src/styles/FlexDemo/index.js | 2 +- src/styles/Mondrian/index.js | 2 +- src/styles/Mondrian/style.js | 1 - src/styles/index.js | 1 - src/touch/index.js | 1 - 51 files changed, 86 insertions(+), 131 deletions(-) diff --git a/src/bestsellers/BookItem.js b/src/bestsellers/BookItem.js index f454b24..7101e73 100644 --- a/src/bestsellers/BookItem.js +++ b/src/bestsellers/BookItem.js @@ -1,6 +1,6 @@ import React, { Component } from "react"; -import { StyleSheet, Text, View, Image, ListView } from "react-native"; +import { StyleSheet, Text, View, Image } from "react-native"; const styles = StyleSheet.create({ bookItem: { diff --git a/src/bestsellers/BookList.js b/src/bestsellers/BookList.js index 841a67b..1186b9b 100644 --- a/src/bestsellers/BookList.js +++ b/src/bestsellers/BookList.js @@ -1,6 +1,6 @@ import React, { Component } from "react"; -import { StyleSheet, Text, View, Image, FlatList } from "react-native"; +import { StyleSheet, View, FlatList } from "react-native"; import BookItem from "./BookItem"; import NYT from "./NYT"; diff --git a/src/bestsellers/BookSectionList.js b/src/bestsellers/BookSectionList.js index 15886d6..0d970e1 100644 --- a/src/bestsellers/BookSectionList.js +++ b/src/bestsellers/BookSectionList.js @@ -1,6 +1,6 @@ import React, { Component } from "react"; -import { StyleSheet, Text, View, Image, SectionList } from "react-native"; +import { StyleSheet, Text, View, SectionList } from "react-native"; import BookItem from "./BookItem"; import NYT from "./NYT"; @@ -25,29 +25,27 @@ class BookList extends Component { }; _refreshData = () => { - Promise - .all([ - NYT.fetchBooks("hardcover-fiction"), - NYT.fetchBooks("hardcover-nonfiction") - ]) - .then(results => { - if (results.length !== 2) { - console.error("Unexpected results"); - } + Promise.all([ + NYT.fetchBooks("hardcover-fiction"), + NYT.fetchBooks("hardcover-nonfiction") + ]).then(results => { + if (results.length !== 2) { + console.error("Unexpected results"); + } - this.setState({ - sections: [ - { - title: "Hardcover Fiction", - data: this._addKeysToBooks(results[0]) - }, - { - title: "Hardcover NonFiction", - data: this._addKeysToBooks(results[1]) - } - ] - }); + this.setState({ + sections: [ + { + title: "Hardcover Fiction", + data: this._addKeysToBooks(results[0]) + }, + { + title: "Hardcover NonFiction", + data: this._addKeysToBooks(results[1]) + } + ] }); + }); }; _renderItem = ({ item }) => { @@ -61,11 +59,7 @@ class BookList extends Component { }; _renderHeader = ({ section }) => { - return ( - - {section.title} - - ); + return {section.title}; }; render() { diff --git a/src/bestsellers/MockBookList.js b/src/bestsellers/MockBookList.js index 110488f..5f796db 100644 --- a/src/bestsellers/MockBookList.js +++ b/src/bestsellers/MockBookList.js @@ -1,6 +1,6 @@ import React, { Component } from "react"; -import { StyleSheet, Text, View, Image, FlatList } from "react-native"; +import { StyleSheet, FlatList } from "react-native"; import BookItem from "./BookItem"; @@ -9,13 +9,15 @@ const mockBooks = [ rank: 1, title: "GATHERING PREY", author: "John Sandford", - book_image: "http://du.ec2.nytimes.com.s3.amazonaws.com/prd/books/9780399168796.jpg" + book_image: + "http://du.ec2.nytimes.com.s3.amazonaws.com/prd/books/9780399168796.jpg" }, { rank: 2, title: "MEMORY MAN", author: "David Baldacci", - book_image: "http://du.ec2.nytimes.com.s3.amazonaws.com/prd/books/9781455586387.jpg" + book_image: + "http://du.ec2.nytimes.com.s3.amazonaws.com/prd/books/9781455586387.jpg" } ]; diff --git a/src/bestsellers/NYT.js b/src/bestsellers/NYT.js index 9fdbc8c..d775d2a 100644 --- a/src/bestsellers/NYT.js +++ b/src/bestsellers/NYT.js @@ -2,7 +2,7 @@ const API_KEY = "73b19491b83909c7e07016f4bb4644f9:2:60667290"; const LIST_NAME = "hardcover-fiction"; const API_STEM = "https://api.nytimes.com/svc/books/v3/lists"; -function fetchBooks(list_name = LIST_NAME) { +function fetchBooks() { let url = `${API_STEM}/${LIST_NAME}?response-format=json&api-key=${API_KEY}`; return fetch(url) .then(response => response.json()) diff --git a/src/bestsellers/index.js b/src/bestsellers/index.js index 2a23634..1256998 100644 --- a/src/bestsellers/index.js +++ b/src/bestsellers/index.js @@ -1,6 +1,3 @@ -import SimpleList from "./SimpleList"; -import MockBookList from "./MockBookList"; -import BookList from "./BookList"; import BookSectionList from "./BookSectionList"; export default BookSectionList; diff --git a/src/depends/index.js b/src/depends/index.js index 4430f3b..9a52f4d 100644 --- a/src/depends/index.js +++ b/src/depends/index.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, Text, View } from "react-native"; +import { StyleSheet, View } from "react-native"; import _ from "lodash"; import Video from "react-native-video"; diff --git a/src/flashcards/src_checkpoint_01/components/DeckScreen/Deck.js b/src/flashcards/src_checkpoint_01/components/DeckScreen/Deck.js index 42955b4..8f1cb6f 100644 --- a/src/flashcards/src_checkpoint_01/components/DeckScreen/Deck.js +++ b/src/flashcards/src_checkpoint_01/components/DeckScreen/Deck.js @@ -1,7 +1,6 @@ import React, { Component } from "react"; import { StyleSheet, View } from "react-native"; -import DeckModel from "./../../data/Deck"; import Button from "./../Button"; import NormalText from "./../NormalText"; import colors from "./../../styles/colors"; @@ -20,7 +19,6 @@ class Deck extends Component { render() { return ( - ); }); diff --git a/src/flashcards/src_checkpoint_01/components/ReviewScreen/ReviewSummary.js b/src/flashcards/src_checkpoint_01/components/ReviewScreen/ReviewSummary.js index 84622c0..ed70862 100644 --- a/src/flashcards/src_checkpoint_01/components/ReviewScreen/ReviewSummary.js +++ b/src/flashcards/src_checkpoint_01/components/ReviewScreen/ReviewSummary.js @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import React from "react"; import { StyleSheet, View } from "react-native"; import HeadingText from "./../HeadingText"; @@ -9,9 +9,7 @@ import colors from "./../../styles/colors"; function mkReviewSummary(percentCorrect, quitFunc) { return ( - - Reviews cleared! - + Reviews cleared! {Math.round(percentCorrect * 100)}% correct diff --git a/src/flashcards/src_checkpoint_02/components/Button.js b/src/flashcards/src_checkpoint_02/components/Button.js index d7134b9..7145825 100644 --- a/src/flashcards/src_checkpoint_02/components/Button.js +++ b/src/flashcards/src_checkpoint_02/components/Button.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, View, TouchableOpacity } from "react-native"; +import { StyleSheet, TouchableOpacity } from "react-native"; import colors from "./../styles/colors"; diff --git a/src/flashcards/src_checkpoint_02/components/DeckScreen/Deck.js b/src/flashcards/src_checkpoint_02/components/DeckScreen/Deck.js index fc9f18c..693f4a2 100644 --- a/src/flashcards/src_checkpoint_02/components/DeckScreen/Deck.js +++ b/src/flashcards/src_checkpoint_02/components/DeckScreen/Deck.js @@ -1,7 +1,6 @@ import React, { Component } from "react"; import { StyleSheet, View } from "react-native"; -import DeckModel from "./../../data/Deck"; import Button from "./../Button"; import NormalText from "./../NormalText"; import colors from "./../../styles/colors"; diff --git a/src/flashcards/src_checkpoint_02/components/DeckScreen/DeckCreation.js b/src/flashcards/src_checkpoint_02/components/DeckScreen/DeckCreation.js index 1bcbf45..caf0b42 100644 --- a/src/flashcards/src_checkpoint_02/components/DeckScreen/DeckCreation.js +++ b/src/flashcards/src_checkpoint_02/components/DeckScreen/DeckCreation.js @@ -1,5 +1,4 @@ import React, { Component } from "react"; -import { StyleSheet, View } from "react-native"; import { CreateDeckButton, EnterDeck } from "./DeckCreationFields"; @@ -19,9 +18,11 @@ class DeckCreation extends Component { }; render() { - let contents = this.state.showingNameField - ? - : ; + let contents = this.state.showingNameField ? ( + + ) : ( + + ); return contents; } } diff --git a/src/flashcards/src_checkpoint_02/components/Flashcards.js b/src/flashcards/src_checkpoint_02/components/Flashcards.js index 8907527..edb6e53 100644 --- a/src/flashcards/src_checkpoint_02/components/Flashcards.js +++ b/src/flashcards/src_checkpoint_02/components/Flashcards.js @@ -1,5 +1,4 @@ -import React, { Component } from "react"; -import { StyleSheet, View } from "react-native"; +import React from "react"; import { StackNavigator } from "react-navigation"; import Logo from "./Header/Logo"; diff --git a/src/flashcards/src_checkpoint_02/components/HeadingText.js b/src/flashcards/src_checkpoint_02/components/HeadingText.js index 067f1eb..021d6ad 100644 --- a/src/flashcards/src_checkpoint_02/components/HeadingText.js +++ b/src/flashcards/src_checkpoint_02/components/HeadingText.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, Text, View } from "react-native"; +import { StyleSheet, Text } from "react-native"; import { fonts, scalingFactors } from "./../styles/fonts"; import Dimensions from "Dimensions"; diff --git a/src/flashcards/src_checkpoint_02/components/Input.js b/src/flashcards/src_checkpoint_02/components/Input.js index 5f4f3d9..905c960 100644 --- a/src/flashcards/src_checkpoint_02/components/Input.js +++ b/src/flashcards/src_checkpoint_02/components/Input.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, TextInput, View } from "react-native"; +import { StyleSheet, TextInput } from "react-native"; import colors from "./../styles/colors"; import { fonts } from "./../styles/fonts"; diff --git a/src/flashcards/src_checkpoint_02/components/NewCardScreen/index.js b/src/flashcards/src_checkpoint_02/components/NewCardScreen/index.js index 2545512..06f983d 100644 --- a/src/flashcards/src_checkpoint_02/components/NewCardScreen/index.js +++ b/src/flashcards/src_checkpoint_02/components/NewCardScreen/index.js @@ -1,8 +1,6 @@ import React, { Component } from "react"; import { StyleSheet, View } from "react-native"; -import DeckModel from "./../../data/Deck"; - import Button from "../Button"; import LabeledInput from "../LabeledInput"; import NormalText from "../NormalText"; diff --git a/src/flashcards/src_checkpoint_02/components/NormalText.js b/src/flashcards/src_checkpoint_02/components/NormalText.js index 99767c0..4581f56 100644 --- a/src/flashcards/src_checkpoint_02/components/NormalText.js +++ b/src/flashcards/src_checkpoint_02/components/NormalText.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, Text, View } from "react-native"; +import { StyleSheet, Text } from "react-native"; import { fonts, scalingFactors } from "./../styles/fonts"; import Dimensions from "Dimensions"; @@ -18,7 +18,7 @@ class NormalText extends Component { } const scaled = StyleSheet.create({ - normal: { fontSize: width * 1.0 / scalingFactors.normal } + normal: { fontSize: (width * 1.0) / scalingFactors.normal } }); export default NormalText; diff --git a/src/flashcards/src_checkpoint_03/components/Button.js b/src/flashcards/src_checkpoint_03/components/Button.js index d7134b9..7145825 100644 --- a/src/flashcards/src_checkpoint_03/components/Button.js +++ b/src/flashcards/src_checkpoint_03/components/Button.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, View, TouchableOpacity } from "react-native"; +import { StyleSheet, TouchableOpacity } from "react-native"; import colors from "./../styles/colors"; diff --git a/src/flashcards/src_checkpoint_03/components/DeckScreen/Deck.js b/src/flashcards/src_checkpoint_03/components/DeckScreen/Deck.js index fc9f18c..693f4a2 100644 --- a/src/flashcards/src_checkpoint_03/components/DeckScreen/Deck.js +++ b/src/flashcards/src_checkpoint_03/components/DeckScreen/Deck.js @@ -1,7 +1,6 @@ import React, { Component } from "react"; import { StyleSheet, View } from "react-native"; -import DeckModel from "./../../data/Deck"; import Button from "./../Button"; import NormalText from "./../NormalText"; import colors from "./../../styles/colors"; diff --git a/src/flashcards/src_checkpoint_03/components/DeckScreen/DeckCreation.js b/src/flashcards/src_checkpoint_03/components/DeckScreen/DeckCreation.js index 1bcbf45..caf0b42 100644 --- a/src/flashcards/src_checkpoint_03/components/DeckScreen/DeckCreation.js +++ b/src/flashcards/src_checkpoint_03/components/DeckScreen/DeckCreation.js @@ -1,5 +1,4 @@ import React, { Component } from "react"; -import { StyleSheet, View } from "react-native"; import { CreateDeckButton, EnterDeck } from "./DeckCreationFields"; @@ -19,9 +18,11 @@ class DeckCreation extends Component { }; render() { - let contents = this.state.showingNameField - ? - : ; + let contents = this.state.showingNameField ? ( + + ) : ( + + ); return contents; } } diff --git a/src/flashcards/src_checkpoint_03/components/Flashcards.js b/src/flashcards/src_checkpoint_03/components/Flashcards.js index 4a87233..162949f 100644 --- a/src/flashcards/src_checkpoint_03/components/Flashcards.js +++ b/src/flashcards/src_checkpoint_03/components/Flashcards.js @@ -1,5 +1,4 @@ import React, { Component } from "react"; -import { StyleSheet, View } from "react-native"; import { StackNavigator } from "react-navigation"; import { createStore } from "redux"; import { Provider } from "react-redux"; diff --git a/src/flashcards/src_checkpoint_03/components/HeadingText.js b/src/flashcards/src_checkpoint_03/components/HeadingText.js index 067f1eb..021d6ad 100644 --- a/src/flashcards/src_checkpoint_03/components/HeadingText.js +++ b/src/flashcards/src_checkpoint_03/components/HeadingText.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, Text, View } from "react-native"; +import { StyleSheet, Text } from "react-native"; import { fonts, scalingFactors } from "./../styles/fonts"; import Dimensions from "Dimensions"; diff --git a/src/flashcards/src_checkpoint_03/components/Input.js b/src/flashcards/src_checkpoint_03/components/Input.js index 5f4f3d9..905c960 100644 --- a/src/flashcards/src_checkpoint_03/components/Input.js +++ b/src/flashcards/src_checkpoint_03/components/Input.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, TextInput, View } from "react-native"; +import { StyleSheet, TextInput } from "react-native"; import colors from "./../styles/colors"; import { fonts } from "./../styles/fonts"; diff --git a/src/flashcards/src_checkpoint_03/components/NewCardScreen/index.js b/src/flashcards/src_checkpoint_03/components/NewCardScreen/index.js index 6d64405..090872d 100644 --- a/src/flashcards/src_checkpoint_03/components/NewCardScreen/index.js +++ b/src/flashcards/src_checkpoint_03/components/NewCardScreen/index.js @@ -1,7 +1,6 @@ import React, { Component } from "react"; import { StyleSheet, View } from "react-native"; -import DeckModel from "./../../data/Deck"; import { addCard } from "./../../actions/creators"; import { connect } from "react-redux"; diff --git a/src/flashcards/src_checkpoint_03/components/NormalText.js b/src/flashcards/src_checkpoint_03/components/NormalText.js index 99767c0..4581f56 100644 --- a/src/flashcards/src_checkpoint_03/components/NormalText.js +++ b/src/flashcards/src_checkpoint_03/components/NormalText.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, Text, View } from "react-native"; +import { StyleSheet, Text } from "react-native"; import { fonts, scalingFactors } from "./../styles/fonts"; import Dimensions from "Dimensions"; @@ -18,7 +18,7 @@ class NormalText extends Component { } const scaled = StyleSheet.create({ - normal: { fontSize: width * 1.0 / scalingFactors.normal } + normal: { fontSize: (width * 1.0) / scalingFactors.normal } }); export default NormalText; diff --git a/src/flashcards/src_checkpoint_03/components/ReviewScreen/ReviewButtons.js b/src/flashcards/src_checkpoint_03/components/ReviewScreen/ReviewButtons.js index 3f43d88..9cbb190 100644 --- a/src/flashcards/src_checkpoint_03/components/ReviewScreen/ReviewButtons.js +++ b/src/flashcards/src_checkpoint_03/components/ReviewScreen/ReviewButtons.js @@ -1,9 +1,8 @@ import React, { Component } from "react"; -import { StyleSheet, View } from "react-native"; +import { StyleSheet } from "react-native"; import Button from "./../Button"; import NormalText from "./../NormalText"; -import HeadingText from "./../HeadingText"; import colors from "./../../styles/colors"; class ContinueButton extends Component { @@ -65,9 +64,7 @@ function mkAnswerButtons( selectAnswerFunc(isCorrectAnswer); }} > - - {a} - + {a} ); }); diff --git a/src/flashcards/src_checkpoint_03/components/ReviewScreen/ReviewSummary.js b/src/flashcards/src_checkpoint_03/components/ReviewScreen/ReviewSummary.js index 84622c0..ed70862 100644 --- a/src/flashcards/src_checkpoint_03/components/ReviewScreen/ReviewSummary.js +++ b/src/flashcards/src_checkpoint_03/components/ReviewScreen/ReviewSummary.js @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import React from "react"; import { StyleSheet, View } from "react-native"; import HeadingText from "./../HeadingText"; @@ -9,9 +9,7 @@ import colors from "./../../styles/colors"; function mkReviewSummary(percentCorrect, quitFunc) { return ( - - Reviews cleared! - + Reviews cleared! {Math.round(percentCorrect * 100)}% correct diff --git a/src/flashcards/src_checkpoint_03/components/ReviewScreen/index.js b/src/flashcards/src_checkpoint_03/components/ReviewScreen/index.js index 7df1669..490e081 100644 --- a/src/flashcards/src_checkpoint_03/components/ReviewScreen/index.js +++ b/src/flashcards/src_checkpoint_03/components/ReviewScreen/index.js @@ -5,7 +5,7 @@ import { connect } from "react-redux"; import ViewCard from "./ViewCard"; import { mkReviewSummary } from "./ReviewSummary"; import colors from "./../../styles/colors"; -import { reviewCard, nextReview, stopReview } from "./../../actions/creators"; +import { nextReview, stopReview } from "./../../actions/creators"; class ReviewScreen extends Component { static displayName = "ReviewScreen"; @@ -54,11 +54,7 @@ class ReviewScreen extends Component { } render() { - return ( - - {this._contents()} - - ); + return {this._contents()}; } } diff --git a/src/flashcards/src_checkpoint_03/reducers/index.js b/src/flashcards/src_checkpoint_03/reducers/index.js index 4d271a0..f6a73cf 100644 --- a/src/flashcards/src_checkpoint_03/reducers/index.js +++ b/src/flashcards/src_checkpoint_03/reducers/index.js @@ -1,4 +1,4 @@ -import { MockDecks, MockCards } from "./../data/Mocks"; +import { MockDecks } from "./../data/Mocks"; import DecksReducer from "./decks"; import ReviewReducer, { mkReviewState } from "./reviews"; diff --git a/src/flashcards/src_checkpoint_04/components/Button.js b/src/flashcards/src_checkpoint_04/components/Button.js index d7134b9..7145825 100644 --- a/src/flashcards/src_checkpoint_04/components/Button.js +++ b/src/flashcards/src_checkpoint_04/components/Button.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, View, TouchableOpacity } from "react-native"; +import { StyleSheet, TouchableOpacity } from "react-native"; import colors from "./../styles/colors"; diff --git a/src/flashcards/src_checkpoint_04/components/Flashcards.js b/src/flashcards/src_checkpoint_04/components/Flashcards.js index d1d1056..248ca19 100644 --- a/src/flashcards/src_checkpoint_04/components/Flashcards.js +++ b/src/flashcards/src_checkpoint_04/components/Flashcards.js @@ -1,5 +1,4 @@ import React, { Component } from "react"; -import { StyleSheet, View } from "react-native"; import { StackNavigator } from "react-navigation"; import { createStore } from "redux"; import { Provider } from "react-redux"; diff --git a/src/flashcards/src_checkpoint_04/components/HeadingText.js b/src/flashcards/src_checkpoint_04/components/HeadingText.js index 067f1eb..021d6ad 100644 --- a/src/flashcards/src_checkpoint_04/components/HeadingText.js +++ b/src/flashcards/src_checkpoint_04/components/HeadingText.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, Text, View } from "react-native"; +import { StyleSheet, Text } from "react-native"; import { fonts, scalingFactors } from "./../styles/fonts"; import Dimensions from "Dimensions"; diff --git a/src/flashcards/src_checkpoint_04/components/Input.js b/src/flashcards/src_checkpoint_04/components/Input.js index 5f4f3d9..905c960 100644 --- a/src/flashcards/src_checkpoint_04/components/Input.js +++ b/src/flashcards/src_checkpoint_04/components/Input.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, TextInput, View } from "react-native"; +import { StyleSheet, TextInput } from "react-native"; import colors from "./../styles/colors"; import { fonts } from "./../styles/fonts"; diff --git a/src/flashcards/src_checkpoint_04/components/NewCardScreen/index.js b/src/flashcards/src_checkpoint_04/components/NewCardScreen/index.js index 6d64405..090872d 100644 --- a/src/flashcards/src_checkpoint_04/components/NewCardScreen/index.js +++ b/src/flashcards/src_checkpoint_04/components/NewCardScreen/index.js @@ -1,7 +1,6 @@ import React, { Component } from "react"; import { StyleSheet, View } from "react-native"; -import DeckModel from "./../../data/Deck"; import { addCard } from "./../../actions/creators"; import { connect } from "react-redux"; diff --git a/src/flashcards/src_checkpoint_04/components/NormalText.js b/src/flashcards/src_checkpoint_04/components/NormalText.js index 99767c0..4581f56 100644 --- a/src/flashcards/src_checkpoint_04/components/NormalText.js +++ b/src/flashcards/src_checkpoint_04/components/NormalText.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, Text, View } from "react-native"; +import { StyleSheet, Text } from "react-native"; import { fonts, scalingFactors } from "./../styles/fonts"; import Dimensions from "Dimensions"; @@ -18,7 +18,7 @@ class NormalText extends Component { } const scaled = StyleSheet.create({ - normal: { fontSize: width * 1.0 / scalingFactors.normal } + normal: { fontSize: (width * 1.0) / scalingFactors.normal } }); export default NormalText; diff --git a/src/flashcards/src_checkpoint_04/components/ReviewScreen/ReviewButtons.js b/src/flashcards/src_checkpoint_04/components/ReviewScreen/ReviewButtons.js index 3f43d88..9cbb190 100644 --- a/src/flashcards/src_checkpoint_04/components/ReviewScreen/ReviewButtons.js +++ b/src/flashcards/src_checkpoint_04/components/ReviewScreen/ReviewButtons.js @@ -1,9 +1,8 @@ import React, { Component } from "react"; -import { StyleSheet, View } from "react-native"; +import { StyleSheet } from "react-native"; import Button from "./../Button"; import NormalText from "./../NormalText"; -import HeadingText from "./../HeadingText"; import colors from "./../../styles/colors"; class ContinueButton extends Component { @@ -65,9 +64,7 @@ function mkAnswerButtons( selectAnswerFunc(isCorrectAnswer); }} > - - {a} - + {a} ); }); diff --git a/src/flashcards/src_checkpoint_04/components/ReviewScreen/ReviewSummary.js b/src/flashcards/src_checkpoint_04/components/ReviewScreen/ReviewSummary.js index 84622c0..ed70862 100644 --- a/src/flashcards/src_checkpoint_04/components/ReviewScreen/ReviewSummary.js +++ b/src/flashcards/src_checkpoint_04/components/ReviewScreen/ReviewSummary.js @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import React from "react"; import { StyleSheet, View } from "react-native"; import HeadingText from "./../HeadingText"; @@ -9,9 +9,7 @@ import colors from "./../../styles/colors"; function mkReviewSummary(percentCorrect, quitFunc) { return ( - - Reviews cleared! - + Reviews cleared! {Math.round(percentCorrect * 100)}% correct diff --git a/src/flashcards/src_checkpoint_04/components/ReviewScreen/index.js b/src/flashcards/src_checkpoint_04/components/ReviewScreen/index.js index 7df1669..490e081 100644 --- a/src/flashcards/src_checkpoint_04/components/ReviewScreen/index.js +++ b/src/flashcards/src_checkpoint_04/components/ReviewScreen/index.js @@ -5,7 +5,7 @@ import { connect } from "react-redux"; import ViewCard from "./ViewCard"; import { mkReviewSummary } from "./ReviewSummary"; import colors from "./../../styles/colors"; -import { reviewCard, nextReview, stopReview } from "./../../actions/creators"; +import { nextReview, stopReview } from "./../../actions/creators"; class ReviewScreen extends Component { static displayName = "ReviewScreen"; @@ -54,11 +54,7 @@ class ReviewScreen extends Component { } render() { - return ( - - {this._contents()} - - ); + return {this._contents()}; } } diff --git a/src/flashcards/src_checkpoint_04/reducers/decks.js b/src/flashcards/src_checkpoint_04/reducers/decks.js index 9eb40fe..b6e88c6 100644 --- a/src/flashcards/src_checkpoint_04/reducers/decks.js +++ b/src/flashcards/src_checkpoint_04/reducers/decks.js @@ -1,5 +1,4 @@ import { ADD_DECK, ADD_CARD, LOAD_DATA } from "../actions/types"; -import Deck from "./../data/Deck"; import { writeDecks } from "./../storage/decks"; function decksWithNewCard(oldDecks, card) { @@ -30,7 +29,6 @@ const reducer = (state = [], action) => { return newState; case ADD_CARD: return decksWithNewCard(state, action.data); - } return state; }; diff --git a/src/flashcards/src_checkpoint_04/reducers/index.js b/src/flashcards/src_checkpoint_04/reducers/index.js index 4d271a0..f6a73cf 100644 --- a/src/flashcards/src_checkpoint_04/reducers/index.js +++ b/src/flashcards/src_checkpoint_04/reducers/index.js @@ -1,4 +1,4 @@ -import { MockDecks, MockCards } from "./../data/Mocks"; +import { MockDecks } from "./../data/Mocks"; import DecksReducer from "./decks"; import ReviewReducer, { mkReviewState } from "./reviews"; diff --git a/src/styles/FlexDemo/index.js b/src/styles/FlexDemo/index.js index 98b1078..92fd767 100644 --- a/src/styles/FlexDemo/index.js +++ b/src/styles/FlexDemo/index.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, Text, View } from "react-native"; +import { Text, View } from "react-native"; import styles from "./style"; diff --git a/src/styles/Mondrian/index.js b/src/styles/Mondrian/index.js index 337a86b..8640da7 100644 --- a/src/styles/Mondrian/index.js +++ b/src/styles/Mondrian/index.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { StyleSheet, Text, View } from "react-native"; +import { View } from "react-native"; import styles from "./style"; diff --git a/src/styles/Mondrian/style.js b/src/styles/Mondrian/style.js index 17eb14b..f133f59 100644 --- a/src/styles/Mondrian/style.js +++ b/src/styles/Mondrian/style.js @@ -1,4 +1,3 @@ -import React from "react"; import { StyleSheet } from "react-native"; const styles = StyleSheet.create({ diff --git a/src/styles/index.js b/src/styles/index.js index f9edea8..3265e66 100644 --- a/src/styles/index.js +++ b/src/styles/index.js @@ -1,4 +1,3 @@ import FlexDemo from "./FlexDemo"; -import Mondrian from "./Mondrian"; export default FlexDemo; diff --git a/src/touch/index.js b/src/touch/index.js index 4a5180c..965cc71 100644 --- a/src/touch/index.js +++ b/src/touch/index.js @@ -1,4 +1,3 @@ -import PressDemo from "./PressDemo"; import PanDemo from "./PanDemo"; export default PanDemo;