Skip to content

Commit

Permalink
Feedback | Org About is not collapsed
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Sep 19, 2024
1 parent c9b92db commit ac99f41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/components/common/About.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import Typography from '@mui/material/Typography'
import Collapse from '@mui/material/Collapse';
import Link from './Link'

const About = ({ title, text, style }) => {
const About = ({ title, text, style, expanded }) => {
const { t } = useTranslation()
const [showAll, setShowAll] = React.useState(false)
const [showAll, setShowAll] = React.useState(Boolean(expanded))
const [showReadMoreButton, setShowReadMoreButton] = React.useState(false)

const shouldShowReadMore = () => {
if(expanded)
return false
if(!showAll && text) {
const el = document.getElementById('about-text')
if(el && el?.clientHeight)
Expand Down
2 changes: 1 addition & 1 deletion src/components/orgs/OrgOverview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const OrgOverview = ({ org, bookmarks, members, height }) => {
<div className='col-xs-12 padding-0' style={{height: height || '100%' }}>
<div className='col-xs-9' style={{padding: '0 16px', height: '100%', overflow: 'auto', width: '80%'}}>
<Bookmarks bookmarks={bookmarks} />
<About text={org?.text} title={t('org.about_the_org')} />
<About text={org?.text} title={t('org.about_the_org')} expanded />
{
Boolean(org?.id && repos == 0) &&
<div className='col-xs-12' style={{marginTop: '15%', marginBottom: '16px'}}>
Expand Down

0 comments on commit ac99f41

Please sign in to comment.