Use VweKomante & add Dekoneksyon
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import {useEffect, useState} from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import Link from 'next/link'
|
||||
import {useRouter} from 'next/router'
|
||||
import {useSession} from 'next-auth/client'
|
||||
|
||||
import {
|
||||
Grid,
|
||||
@@ -25,6 +27,9 @@ import {makeStyles, useTheme} from '@material-ui/core/styles'
|
||||
|
||||
import {formatJsonString} from '../../lib/utils/format'
|
||||
|
||||
import VweKomante from '../komante/vwe-komante'
|
||||
import Dekoneksyon from '../sesyon/dekoneksyon'
|
||||
|
||||
import DrawerBar from './drawer-bar'
|
||||
import DenyeTeks from './denye-teks'
|
||||
import VweKouteAchte from './vwe-koute-achte'
|
||||
@@ -160,7 +165,10 @@ const alignTeks = (langArray, isMobile) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default function TeksDrawer({teks, anTeks}) {
|
||||
export default function TeksDrawer({teks, anTeks, komante}) {
|
||||
const [session] = useSession()
|
||||
const router = useRouter()
|
||||
|
||||
const isMobile = useMediaQuery('(max-width:800px)')
|
||||
const langArray = langToArray(anTeks)
|
||||
const classes = useStyles()
|
||||
@@ -270,9 +278,12 @@ export default function TeksDrawer({teks, anTeks}) {
|
||||
{anTeks.eksplisit && (
|
||||
<ExplicitIcon style={{marginLeft: 10}} color='secondary' />
|
||||
)}
|
||||
<div className={classes.pataje}>
|
||||
<Pataje teks={anTeks} setError={setError} setSuccess={setSuccess} />
|
||||
</div>
|
||||
{komante && (
|
||||
<VweKomante komante={komante} teks={anTeks} />
|
||||
)}
|
||||
{session && (
|
||||
<Dekoneksyon chimen={router.asPath} tooltipPlacement='bottom' />
|
||||
)}
|
||||
</Typography>
|
||||
<Typography variant='caption'>
|
||||
{anTeks.user && (
|
||||
@@ -332,9 +343,11 @@ export default function TeksDrawer({teks, anTeks}) {
|
||||
|
||||
TeksDrawer.propTypes = {
|
||||
teks: PropTypes.array.isRequired,
|
||||
anTeks: PropTypes.object
|
||||
anTeks: PropTypes.object,
|
||||
komante: PropTypes.array
|
||||
}
|
||||
|
||||
TeksDrawer.defaultProps = {
|
||||
anTeks: null
|
||||
anTeks: null,
|
||||
komante: null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user