Make hide_tooltip actually hide the tooltip
Some checks failed
Deploy to GitHub Pages / build (push) Has been cancelled
Deploy to GitHub Pages / deploy (push) Has been cancelled

This commit is contained in:
Misode
2024-12-06 19:23:38 +01:00
parent c066d88518
commit 22d35ef6a8
2 changed files with 1 additions and 5 deletions

View File

@@ -61,7 +61,7 @@ export function ItemDisplay({ item, slotDecoration, tooltip, advancedTooltip }:
</svg>}
<div class="item-slot-overlay"></div>
</>}
{tooltip !== false && <div class="item-tooltip" style={tooltipOffset && {
{tooltip !== false && !resolvedItem.has('hide_tooltip') && <div class="item-tooltip" style={tooltipOffset && {
left: (tooltipSwap ? undefined : `${tooltipOffset[0]}px`),
right: (tooltipSwap ? `${tooltipOffset[0]}px` : undefined),
top: `${tooltipOffset[1]}px`,

View File

@@ -11,10 +11,6 @@ interface Props {
resolver: (item: ItemStack) => ResolvedItem,
}
export function ItemTooltip({ item, advanced, resolver }: Props) {
if (item.has('hide_tooltip')) {
return <></>
}
return <>
<TextComponent component={item.getStyledHoverName()} />
{!advanced && !item.has('custom_name') && item.is('filled_map') && item.has('map_id') && (