[Refactor] Change state management structures. Async atom to be manage manually.

This commit is contained in:
Sakamoto Shiina
2024-09-23 03:44:33 +09:00
parent 586aaf0091
commit 0616092eff
49 changed files with 295 additions and 190 deletions

View File

@@ -71,8 +71,8 @@ const generateMessageObject = (data, category) => {
};
const updateItemById = (id, translated_data) => (prev_items) => {
return prev_items.map(item => {
const updateItemById = (id, translated_data) => (current_items) => {
return current_items.data.map(item => {
if (item.id === id) {
item.status = "ok";
item.messages.translated = translated_data;