From 32dc0518a20af4b127ac8cafeeaf1708784c373d Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Thu, 30 Sep 2021 19:21:08 -0400 Subject: [PATCH] study links on browser and formatting fix on phonetics viewer --- package.json | 1 + src/App.tsx | 2 - src/components/Table.js | 2 +- src/components/phonetics/PhoneticsViewer.tsx | 137 ++++++++++--------- src/content/games.mdx | 2 +- src/games/GamesBrowser.tsx | 11 +- src/games/games.tsx | 19 ++- src/games/sub-cores/GenderGame.tsx | 4 +- src/games/sub-cores/UnisexNounGame.tsx | 4 +- src/types.d.ts | 1 + yarn.lock | 29 ++++ 11 files changed, 132 insertions(+), 80 deletions(-) diff --git a/package.json b/package.json index df356e8..7ed2f23 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "react-countdown-circle-timer": "^2.5.4", "react-dom": "^17.0.1", "react-ga": "^3.3.0", + "react-media": "^1.10.0", "react-rewards": "^1.1.2", "react-router-dom": "^5.2.0", "react-router-hash-link": "^2.3.1", diff --git a/src/App.tsx b/src/App.tsx index 355143f..2f2906b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -37,8 +37,6 @@ if (prod) { function App(props: RouteComponentProps) { const [navOpen, setNavOpen] = useState(false); const { user } = useUser(); - // TODO: seperate function for getUserInfo with useUser and fetch - // then set cronjob to call that - also do signin flox useEffect(() => { ReactGA.pageview(window.location.pathname); }, []); diff --git a/src/components/Table.js b/src/components/Table.js index ed3dc01..b2ff8d5 100644 --- a/src/components/Table.js +++ b/src/components/Table.js @@ -12,7 +12,7 @@ const isObject = x => ( function Table({ headRow, children, opts, wide }) { return (
Phonetic Letter | - {/*IPA Letter | */} -Short Explanation | -Example | -Pashto Letter(s) | -||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- {phoneme.phoneme} - | - {/*{phoneme.ipa.letter} | */} -- {phoneme.quickExplanation}{" "} - {phoneme.ipa.video && ( - - - - )} - | -- {highlightExample( - phoneme.examples[0].f, - phoneme.examples[0].fHighlight - )} - {` - `} - {highlightExample( - phoneme.examples[0].p, - phoneme.examples[0].pHighlight - )} - | -- {phoneme.possibleLetters - ? phoneme.possibleLetters.reduce( - (s, l) => - `${s}${l.letter} ${ - l.alternate ? ` (${l.alternate}) ` : "" - }`, - "" - ) - : ""} - {/* phoneme.diacritic && `(diacritic ◌${phoneme.diacritic})` */} - | +
Phonetic Letter | + {/*IPA Letter | */} +Short Explanation | +Example | +Pashto Letter(s) |
---|
Notes about {selectedOption.label.toLowerCase()}:
{selectedOption.notes} diff --git a/src/content/games.mdx b/src/content/games.mdx index c6c81d1..524daa1 100644 --- a/src/content/games.mdx +++ b/src/content/games.mdx @@ -4,7 +4,7 @@ title: Games 🎮 import Link from "../components/Link"; -There are little games/quizzes scattered throughout this book. Here you can see them all listed below. If you are logged in, when you successfully complete a game you will see a ✅ beside it. Try to master them all! 🤓🏆 +There are little games/quizzes scattered throughout this book. Here you can see them all listed below. If you are logged in, when you successfully complete a game you will see a ✅ beside it. To study for a game, click on the 📚 on the right. Try to master them all! 🤓🏆 There currently just a few games available. Keep checking back as over time there will be lots of games covering all the aspects of grammar. diff --git a/src/games/GamesBrowser.tsx b/src/games/GamesBrowser.tsx index f00f70b..d5a05de 100644 --- a/src/games/GamesBrowser.tsx +++ b/src/games/GamesBrowser.tsx @@ -1,6 +1,7 @@ import React, { useState } from "react"; import games from "./games"; import { useUser } from "../user-context"; +import Link from "../components/Link"; import SmoothCollapse from "react-smooth-collapse"; function GamesBrowser() { @@ -15,7 +16,7 @@ function GamesBrowser() { {games.map((chapter) => ( <>