차트 설정 수정

This commit is contained in:
Macbook
2026-06-01 01:35:31 +09:00
parent 332019866a
commit f2208aab99
28 changed files with 546 additions and 333 deletions
@@ -515,7 +515,7 @@ export default function StrategyEditorPage({ theme }: Props) {
if (!hasRegisteredUser()) return;
loadStrategies().then(async list => {
if (list?.length) {
setStrategies(list.map(s => ({
const mapped = list.map(s => ({
id: s.id ?? Date.now(),
name: s.name,
description: s.description,
@@ -525,7 +525,11 @@ export default function StrategyEditorPage({ theme }: Props) {
enabled: s.enabled ?? true,
createdAt: s.createdAt,
updatedAt: s.updatedAt,
})));
}));
setStrategies(mapped);
setSelectedId(prev =>
prev != null && mapped.some(x => x.id === prev) ? prev : null,
);
} else {
const local = loadStratsLocal();
if (!local.length) return;