tooling tweak

This commit is contained in:
Reece 2025-10-29 00:00:07 +00:00
parent 0bbd40eba7
commit 1ab912281b
2 changed files with 7 additions and 9 deletions

View File

@ -80,6 +80,8 @@ const ToolStep = ({
alwaysShowTooltip = false,
tooltip
}: ToolStepProps) => {
if (!isVisible) return null;
const parent = useContext(ToolStepContext);
// Auto-detect if we should show numbers based on sibling count or force option
@ -91,8 +93,6 @@ const ToolStep = ({
const stepNumber = _stepNumber;
if (!isVisible) return null;
return (
<div>
<div

View File

@ -2,13 +2,11 @@ import { useTranslation } from 'react-i18next';
import { TooltipContent } from '@app/types/tips';
import { SPLIT_METHODS, type SplitMethod } from '@app/constants/splitConstants';
/**
* Hook that returns tooltip content for ALL split methods
* Can be called once and then looked up by method
*/
export const useSplitSettingsTips = (): Record<SplitMethod, TooltipContent> => {
export const useSplitSettingsTips = (method: SplitMethod | ''): TooltipContent | null => {
const { t } = useTranslation();
if (!method) return null;
const tooltipMap: Record<SplitMethod, TooltipContent> = {
[SPLIT_METHODS.BY_PAGES]: {
header: {
@ -132,5 +130,5 @@ export const useSplitSettingsTips = (): Record<SplitMethod, TooltipContent> => {
}
};
return tooltipMap;
};
return tooltipMap[method];
};