Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1952 | fixing repo tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Oct 24, 2024
1 parent e14817c commit b19acfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/repos/RepoTooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const TooltipTitle = ({ repo }) => {
// only need --> repo = {url: '/orgs/MyOrg/sources/MySource/', id: 'MyOrg'}
const url = repo?.version_url || repo?.url
const owner = URIToOwnerParams(url)
const repoId = repo?.short_code || repo?.id

const [entity, setEntity] = React.useState(repo || {})
const shouldRefetch = () => Boolean(url && !has(entity, 'summary'))
Expand All @@ -34,6 +33,7 @@ const TooltipTitle = ({ repo }) => {
}, [repo?.version_url || repo?.url])

const history = useHistory()
const repoId = entity?.short_code || entity?.id || repo?.short_code || repo?.id

return (
<React.Fragment>
Expand Down Expand Up @@ -66,7 +66,7 @@ const TooltipTitle = ({ repo }) => {
<DotSeparator margin='0 8px' />
<RepoVersionButton
icon={<RepoIcon sx={{width: '15px', height: '15px'}} />}
repo={repoId}
repo={entity?.short_code || entity?.id || repoId}
href={url}
size='small'
repoLabelStyle={{
Expand Down

0 comments on commit b19acfa

Please sign in to comment.