Skip to content

Commit

Permalink
feat: 🎸 add ios, android in contact us
Browse files Browse the repository at this point in the history
  • Loading branch information
yeukfei02 committed Jul 8, 2022
1 parent 88d09b1 commit 986b2aa
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ $ yarn run format
$ yarn run deploy-firebase
```
open localhost:5000
open localhost:5100
## Docker
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"typescript": "^4.1.2"
},
"scripts": {
"dev": "PORT=5000 react-scripts start",
"dev": "PORT=5100 react-scripts start",
"production": "yarn run build && yarn run start",
"start": "serve -s build",
"build": "react-scripts build",
Expand Down
21 changes: 21 additions & 0 deletions src/components/contact/Contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import Paper from '@material-ui/core/Paper';
import Tooltip from '@material-ui/core/Tooltip';
import EmailIcon from '@material-ui/icons/Email';
import GitHubIcon from '@material-ui/icons/GitHub';
import AppleIcon from '@material-ui/icons/Apple';
import AndroidIcon from '@material-ui/icons/Android';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import FormControl from '@material-ui/core/FormControl';
import Radio from '@material-ui/core/Radio';
Expand Down Expand Up @@ -39,6 +41,14 @@ function Contact(): JSX.Element {
window.open('https://github.com/yeukfei02');
};

const handleAppleIconClick = () => {
window.open('https://apps.apple.com/us/app/lunchpickerlite/id1509385881');
};

const handleAndroidIconClick = () => {
window.open('https://play.google.com/store/apps/details?id=com.donaldwu.lunchpickerlite');
};

const handleDonate = () => {
window.open('https://donorbox.org/donate-for-lunch-picker-better-features-and-development');
};
Expand Down Expand Up @@ -97,6 +107,17 @@ function Contact(): JSX.Element {
</Tooltip>
</Paper>
</div>
<div className="mt-5 d-flex justify-content-center">
<Paper className={`${classes.root} mx-4 w-75 text-center`}>
<h5>{t('lunchPickerApp')}</h5>
<Tooltip title="ios" placement="bottom">
<AppleIcon style={{ cursor: 'pointer' }} className="mr-3" fontSize="large" onClick={handleAppleIconClick} />
</Tooltip>
<Tooltip title="android" placement="bottom">
<AndroidIcon style={{ cursor: 'pointer' }} fontSize="large" onClick={handleAndroidIconClick} />
</Tooltip>
</Paper>
</div>
<div className="my-5 d-flex justify-content-center">
<Paper className={`${classes.root} mx-4 w-75`}>
<h5 className="text-center">{t('donateTitle')}</h5>
Expand Down
2 changes: 2 additions & 0 deletions src/translations/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"chinese": "Chinese",

"contactTitle": "Contact us via email or visit our github repo",
"lunchPickerApp": "Lunch Picker App",
"donateTitle": "Donate for lunch picker better features and development",
"donate": "Donate",
"buyMeACoffee": "Buy me a coffee",
Expand Down Expand Up @@ -90,6 +91,7 @@
"chinese": "中文",

"contactTitle": "通過電子郵件聯繫我們或訪問我們的github",
"lunchPickerApp": "Lunch Picker 應用程序",
"donateTitle": "為lunch picker捐贈 將來有更好的功能和發展",
"donate": "捐贈",
"buyMeACoffee": "給我買杯咖啡",
Expand Down

0 comments on commit 986b2aa

Please sign in to comment.