Skip to content

Commit

Permalink
Fixed react hook ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilbert09 committed Jun 12, 2024
1 parent 2e60b33 commit 567860b
Showing 1 changed file with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,19 +174,23 @@ function DefinitionView({ group }: { group: TaxonomicFilterGroup }): JSX.Element
</>
)
}
if (isProperty) {

const hasSentAsLabel = useMemo(() => {
const _definition = definition as PropertyDefinition
const hasSentAsLabel = useMemo(() => {
if (isDataWarehousePersonProperty) {
return _definition.id
}

if (_definition.name !== '') {
return _definition.name
}
if (isDataWarehousePersonProperty) {
return _definition.id
}

return <i>(empty string)</i>
}, [isDataWarehousePersonProperty, _definition])
if (_definition.name !== '') {
return _definition.name
}

return <i>(empty string)</i>
}, [isDataWarehousePersonProperty, definition, isProperty])

if (isProperty) {
const _definition = definition as PropertyDefinition

return (
<>
Expand Down

0 comments on commit 567860b

Please sign in to comment.