Add Telegram link
This commit is contained in:
@@ -46,11 +46,13 @@ export default function RezoMenu({data}) {
|
|||||||
setAnchorElement(event.currentTarget)
|
setAnchorElement(event.currentTarget)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClose = rezo => {
|
const handleClose = (rezo, link) => {
|
||||||
setAnchorElement(null)
|
setAnchorElement(null)
|
||||||
if (typeof rezo === 'string') {
|
if (typeof rezo === 'string' && !link) {
|
||||||
const url = `https://${rezo}.${siteDomain}`
|
const url = `https://${rezo}.${siteDomain}`
|
||||||
router.push(url)
|
router.push(url)
|
||||||
|
} else if (typeof rezo === 'string' && link) {
|
||||||
|
window.open(link, '_blank')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,8 +77,8 @@ export default function RezoMenu({data}) {
|
|||||||
open={Boolean(anchorElement)}
|
open={Boolean(anchorElement)}
|
||||||
onClose={handleClose}
|
onClose={handleClose}
|
||||||
>
|
>
|
||||||
{data.map(({id, tit, icon}) => (
|
{data.map(({id, tit, icon, link}) => (
|
||||||
<StyledMenuItem key={id} onClick={() => handleClose(id)}>
|
<StyledMenuItem key={id} onClick={() => handleClose(id, link)}>
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
{icon}
|
{icon}
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import {makeStyles} from '@material-ui/core/styles'
|
|||||||
import GroupIcon from '@material-ui/icons/Group'
|
import GroupIcon from '@material-ui/icons/Group'
|
||||||
import MusicNoteIcon from '@material-ui/icons/MusicNote'
|
import MusicNoteIcon from '@material-ui/icons/MusicNote'
|
||||||
import {Pleroma, Peertube} from '@icons-pack/react-simple-icons'
|
import {Pleroma, Peertube} from '@icons-pack/react-simple-icons'
|
||||||
|
import TelegramIcon from '@material-ui/icons/Telegram'
|
||||||
|
|
||||||
import KatKayLa from '../components/kat-kay-la'
|
import KatKayLa from '../components/kat-kay-la'
|
||||||
import HeadLayout from '../components/head-layout'
|
import HeadLayout from '../components/head-layout'
|
||||||
@@ -25,6 +26,12 @@ const useStyles = makeStyles(theme => ({
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
const REZO = [
|
const REZO = [
|
||||||
|
{
|
||||||
|
id: 'telegram',
|
||||||
|
tit: 'Telegram',
|
||||||
|
icon: <TelegramIcon />,
|
||||||
|
link: 'https://t.me/OrganisationKA'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'mizik',
|
id: 'mizik',
|
||||||
tit: 'Mizik',
|
tit: 'Mizik',
|
||||||
|
|||||||
Reference in New Issue
Block a user