From 828d30689a59ca6f90acb3474e3df7d70d77efed Mon Sep 17 00:00:00 2001 From: MUYANGGUO Date: Tue, 13 Feb 2024 15:23:19 -0800 Subject: [PATCH 1/2] update readme --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 54d8ffc..c01eea7 100644 --- a/README.md +++ b/README.md @@ -133,18 +133,21 @@ Regular Mode and Recite Mode Screen Shot 2022-08-23 at 12 52 17 AM +## For Devs ### `npm start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in your browser. - ### `npm run build` - Builds the app for production to the `build` folder.\ +### Pull Requests + +Create a branch with proper name example 'feat/your-cool-feature', create the pull request and add authors for reviews. Please include description with details. + ## Sponsors From 302ae34f22fee05764bda1d90193cc47d9a5fee9 Mon Sep 17 00:00:00 2001 From: MUYANGGUO Date: Wed, 6 Mar 2024 01:33:16 -0800 Subject: [PATCH 2/2] add toastify for future use, replace footer with app bar --- package-lock.json | 36 +++++++++++++++ package.json | 1 + src/components/common/FooterMenu.js | 65 ++++++++++++++-------------- src/components/common/Logo.js | 3 +- src/components/features/SupportMe.js | 2 +- src/components/utils/Select.js | 2 +- src/style/global.js | 7 --- 7 files changed, 74 insertions(+), 42 deletions(-) diff --git a/package-lock.json b/package-lock.json index 130a0c4..87ebe18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "react-dom": "^18.0.0", "react-scripts": "5.0.1", "react-select": "^5.3.0", + "react-toastify": "^10.0.4", "styled-components": "^5.3.5", "use-sound": "^4.0.1", "web-vitals": "^2.1.4" @@ -13761,6 +13762,26 @@ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/react-toastify": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-10.0.4.tgz", + "integrity": "sha512-etR3RgueY8pe88SA67wLm8rJmL1h+CLqUGHuAoNsseW35oTGJEri6eBTyaXnFKNQ80v/eO10hBYLgz036XRGgA==", + "dependencies": { + "clsx": "^2.1.0" + }, + "peerDependencies": { + "react": ">=16", + "react-dom": ">=16" + } + }, + "node_modules/react-toastify/node_modules/clsx": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", + "engines": { + "node": ">=6" + } + }, "node_modules/react-transition-group": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.2.tgz", @@ -26197,6 +26218,21 @@ "react-transition-group": "^4.3.0" } }, + "react-toastify": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-10.0.4.tgz", + "integrity": "sha512-etR3RgueY8pe88SA67wLm8rJmL1h+CLqUGHuAoNsseW35oTGJEri6eBTyaXnFKNQ80v/eO10hBYLgz036XRGgA==", + "requires": { + "clsx": "^2.1.0" + }, + "dependencies": { + "clsx": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==" + } + } + }, "react-transition-group": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.2.tgz", diff --git a/package.json b/package.json index 89e5d9e..321f7ed 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "react-dom": "^18.0.0", "react-scripts": "5.0.1", "react-select": "^5.3.0", + "react-toastify": "^10.0.4", "styled-components": "^5.3.5", "use-sound": "^4.0.1", "web-vitals": "^2.1.4" diff --git a/src/components/common/FooterMenu.js b/src/components/common/FooterMenu.js index 71a52bd..85cf633 100644 --- a/src/components/common/FooterMenu.js +++ b/src/components/common/FooterMenu.js @@ -1,10 +1,10 @@ import React from "react"; -import { Grid } from "@mui/material"; +import { Grid, AppBar } from "@mui/material"; import { Box } from "@mui/system"; import { Tooltip } from "@mui/material"; import IconButton from "@mui/material/IconButton"; import SelfImprovementIcon from "@mui/icons-material/SelfImprovement"; -import VolumeUpIcon from '@mui/icons-material/VolumeUp'; +import VolumeUpIcon from "@mui/icons-material/VolumeUp"; import Select from "../utils/Select"; import { FOCUS_MODE, @@ -15,7 +15,7 @@ import { GAME_MODE_DEFAULT, GAME_MODE_SENTENCE, TRAINER_MODE, - WORDS_CARD_MODE + WORDS_CARD_MODE, } from "../../constants/Constants"; import { Link } from "@mui/material"; import SupportMe from "../features/SupportMe"; @@ -30,8 +30,8 @@ import MusicNoteIcon from "@mui/icons-material/MusicNote"; import EmojiFoodBeverageIcon from "@mui/icons-material/EmojiFoodBeverage"; import { ReactComponent as DiscordIcon } from "../../assets/Icons/discord.svg"; import { SvgIcon } from "@mui/material"; -import KeyboardAltOutlinedIcon from '@mui/icons-material/KeyboardAltOutlined'; -import SchoolIcon from '@mui/icons-material/School'; +import KeyboardAltOutlinedIcon from "@mui/icons-material/KeyboardAltOutlined"; +import SchoolIcon from "@mui/icons-material/School"; import { SOUND_MODE_TOOLTIP } from "../features/sound/sound"; const FooterMenu = ({ @@ -54,7 +54,7 @@ const FooterMenu = ({ isTrainerMode, toggleTrainerMode, isWordsCardMode, - toggleWordsCardMode + toggleWordsCardMode, }) => { const isSiteInfoDisabled = isMusicMode || isFocusedMode; const isBottomLogoEnabled = isFocusedMode && !isMusicMode; @@ -75,7 +75,7 @@ const FooterMenu = ({ }; return ( -
+ e.label === soundType)} - options={soundOptions} - isSearchable={false} - isSelected={false} - onChange={handleSoundTypeChange} - menuPlacement="top" - >)} + {soundMode && ( + + )} {WORDS_CARD_MODE} + + {WORDS_CARD_MODE} + } > @@ -185,20 +189,17 @@ const FooterMenu = ({ + {GITHUB_TOOLTIP_TITLE} - - {AUTHOR} - - - {GITHUB_REPO_LINK} - + + {AUTHOR} + + + {GITHUB_REPO_LINK} + } placement="top-start" @@ -214,7 +215,7 @@ const FooterMenu = ({ title={