이전종목, 다음종목 힌트 테스트 수정
This commit is contained in:
@@ -724,6 +724,21 @@ const StrategyEvaluationChart: React.FC<Props> = ({
|
||||
if (next) onMarketChange(next);
|
||||
}, [sortedMarketCodes, market, onMarketChange]);
|
||||
|
||||
const prevMarketCode = useMemo(
|
||||
() => adjacentMarketInList(sortedMarketCodes, market, 'prev'),
|
||||
[sortedMarketCodes, market],
|
||||
);
|
||||
const nextMarketCode = useMemo(
|
||||
() => adjacentMarketInList(sortedMarketCodes, market, 'next'),
|
||||
[sortedMarketCodes, market],
|
||||
);
|
||||
const prevMarketTitle = prevMarketCode
|
||||
? `이전 종목 (${getKoreanName(prevMarketCode)})`
|
||||
: '이전 종목';
|
||||
const nextMarketTitle = nextMarketCode
|
||||
? `다음 종목 (${getKoreanName(nextMarketCode)})`
|
||||
: '다음 종목';
|
||||
|
||||
useEffect(() => {
|
||||
onChartLoadingChange?.(loading);
|
||||
}, [loading, onChartLoadingChange]);
|
||||
@@ -834,8 +849,8 @@ const StrategyEvaluationChart: React.FC<Props> = ({
|
||||
<button
|
||||
type="button"
|
||||
className="btd-analysis-tool seval-market-nav-btn"
|
||||
title="이전 종목"
|
||||
aria-label="이전 종목"
|
||||
title={prevMarketTitle}
|
||||
aria-label={prevMarketTitle}
|
||||
disabled={!canMarketPrev || sortedMarketCodes.length === 0}
|
||||
onClick={() => stepMarket('prev')}
|
||||
>
|
||||
@@ -846,8 +861,8 @@ const StrategyEvaluationChart: React.FC<Props> = ({
|
||||
<button
|
||||
type="button"
|
||||
className="btd-analysis-tool seval-market-nav-btn"
|
||||
title="다음 종목"
|
||||
aria-label="다음 종목"
|
||||
title={nextMarketTitle}
|
||||
aria-label={nextMarketTitle}
|
||||
disabled={!canMarketNext || sortedMarketCodes.length === 0}
|
||||
onClick={() => stepMarket('next')}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user