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
const entities = { | |
amp: "&", | |
apos: "'", | |
lt: "<", | |
gt: ">", | |
quot: '"', | |
nbsp: "\xa0", | |
ouml: "ö", | |
auml: "ä", | |
uuml: "ü", |
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
import React, { FC } from "react" | |
import { observer } from "mobx-react-lite" | |
import { TextStyle, View, ViewStyle } from "react-native" | |
import { AppStackScreenProps } from "app/navigators" | |
import { Screen, Text } from "app/components" | |
import { spacing } from "app/theme" | |
// import { useNavigation } from "@react-navigation/native" | |
// import { useStores } from "app/models" | |
interface QuestionScreenProps extends AppStackScreenProps<"Question"> {} |
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
import React, { FC, useEffect } from "react" | |
import { observer } from "mobx-react-lite" | |
import { TextStyle, View, ViewStyle } from "react-native" | |
import { AppStackScreenProps } from "app/navigators" | |
import { ListView, Screen, Text } from "app/components" | |
import { colors, spacing } from "app/theme" | |
import { Question, useStores } from "app/models" | |
import { decodeHTMLEntities } from "app/utils/decodeHtml" | |
import { ContentStyle } from "@shopify/flash-list" |
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
import shuffle from "lodash.shuffle" | |
export const QuestionModel = types | |
.model("Question") | |
.props({ | |
id: types.identifier, | |
category: types.maybe(types.string), | |
type: types.enumeration(["multiple", "boolean"]), | |
difficulty: types.enumeration(["easy", "medium", "hard"]), | |
question: types.maybe(types.string), |
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
... | |
import { RadioGroup } from "react-native-radio-buttons-group" | |
... | |
export const QuestionScreen: FC<QuestionScreenProps> = observer(function QuestionScreen() { | |
... | |
const onPressAnswer = (question: Question, guess: string) => { | |
question.setGuess(guess) | |
} |
OlderNewer