diff --git a/components/awtis/awtis-bio.js b/components/awtis/awtis-bio.js new file mode 100644 index 0000000..fee9a2a --- /dev/null +++ b/components/awtis/awtis-bio.js @@ -0,0 +1,83 @@ +import React from 'react' +import PropTypes from 'prop-types' + +import { + Button, + Box, + Typography, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle +} from '@material-ui/core' + +import MizikBadjMeni from './mizik-badj-meni' + +export default function AwtisBio({alias, miziks, bio, isBioOpen, setIsBioOpen}) { + const handleClose = () => { + setIsBioOpen(false) + } + + const descriptionElementRef = React.useRef(null) + React.useEffect(() => { + if (isBioOpen) { + const {current: descriptionElement} = descriptionElementRef + if (descriptionElement !== null) { + descriptionElement.focus() + } + } + }, [isBioOpen]) + + return ( +