diff --git a/frontend/src/components/BottomBar.js b/frontend/src/components/BottomBar.js index ab49528f..8209ab6d 100644 --- a/frontend/src/components/BottomBar.js +++ b/frontend/src/components/BottomBar.js @@ -1,9 +1,8 @@ import React, { Component } from 'react' -import { withTranslation, Trans} from "react-i18next"; +import { withTranslation } from "react-i18next"; import {FormControlLabel, Link, Switch, CircularProgress, Badge, Tooltip, TextField, ListItemAvatar, Button, Avatar,Paper, Grid, IconButton, Typography, Select, MenuItem, List, ListItemText, ListItem, ListItemIcon, ListItemButton, Divider, Dialog, DialogContent} from "@mui/material"; import MediaQuery from 'react-responsive' import { Link as LinkRouter } from 'react-router-dom' -import Flags from 'country-flag-icons/react/3x2' // Icons import SettingsIcon from '@mui/icons-material/Settings'; @@ -16,7 +15,7 @@ import PriceChangeIcon from '@mui/icons-material/PriceChange'; import BoltIcon from '@mui/icons-material/Bolt'; import GitHubIcon from '@mui/icons-material/GitHub'; import EqualizerIcon from '@mui/icons-material/Equalizer'; -import SendIcon from '@mui/icons-material/Send'; + import PublicIcon from '@mui/icons-material/Public'; import NumbersIcon from '@mui/icons-material/Numbers'; import PasswordIcon from '@mui/icons-material/Password'; @@ -29,6 +28,8 @@ import EmojiEventsIcon from '@mui/icons-material/EmojiEvents'; import AmbossIcon from "./icons/AmbossIcon"; import FavoriteIcon from '@mui/icons-material/Favorite'; +import CommunityDialog from './CommunityDialog'; + import { getCookie } from "../utils/cookies"; import { pn } from "../utils/prettyNumbers"; @@ -65,7 +66,6 @@ class BottomBar extends Component { } componentDidMount() { - console.log("mount fernando"); this.getInfo(); } @@ -181,62 +181,6 @@ class BottomBar extends Component { this.setState({openCommuniy: false}); }; - CommunityDialog =() =>{ - const { t } = this.props; - - return( - - - {t("Community")} - -

{t("Support is only offered via public channels. Join our Telegram community if you have questions or want to hang out with other cool robots. Please, use our Github Issues if you find a bug or want to see new features!")}

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- ) - } - handleClickOpenProfile = () => { this.getInfo(); this.setState({openProfile: true, profileShown: true}); @@ -448,7 +392,6 @@ bottomBarDesktop =()=>{ return( {this.StatsDialog()} - {this.CommunityDialog()} {this.dialogProfile()} {this.exchangeSummaryDialog()} @@ -709,7 +652,6 @@ bottomBarPhone =()=>{ return( {this.StatsDialog()} - {this.CommunityDialog()} {this.exchangeSummaryDialog()} {this.dialogProfile()} @@ -806,6 +748,10 @@ bottomBarPhone =()=>{ render() { return (
+ {this.bottomBarDesktop()} diff --git a/frontend/src/components/CommunityDialog/CommunityDialog.tsx b/frontend/src/components/CommunityDialog/CommunityDialog.tsx new file mode 100644 index 00000000..53f59073 --- /dev/null +++ b/frontend/src/components/CommunityDialog/CommunityDialog.tsx @@ -0,0 +1,151 @@ +import React from "react"; +import { useTranslation } from "react-i18next"; +import { + Dialog, + DialogContent, + Divider, + IconButton, + List, + ListItemText, + ListItem, + ListItemIcon, + ListItemButton, + Tooltip, + Typography, +} from "@mui/material"; +import SendIcon from '@mui/icons-material/Send'; +import GitHubIcon from '@mui/icons-material/GitHub'; +import Flags from 'country-flag-icons/react/3x2' + +type Props = { + isOpen: boolean; + handleClickCloseCommunity: () => void; +} + +const CommunityDialog = ({ + isOpen, + handleClickCloseCommunity, +}: Props): JSX.Element => { + const { t } = useTranslation(); + + const flagProps = { + width: 30, + height: 30, + style: { + filter: "drop-shadow(2px 2px 2px #444444)", + }, + }; + + return ( + + + + {t("Community")} + + + +

{t("Support is only offered via public channels. Join our Telegram community if you have questions or want to hang out with other cool robots. Please, use our Github Issues if you find a bug or want to see new features!")}

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ ); +}; + +export default CommunityDialog; diff --git a/frontend/src/components/CommunityDialog/index.ts b/frontend/src/components/CommunityDialog/index.ts new file mode 100644 index 00000000..804be987 --- /dev/null +++ b/frontend/src/components/CommunityDialog/index.ts @@ -0,0 +1 @@ +export { default } from "./CommunityDialog";