parent
commit
247baa5f9c
  1. 15
      src/components/Componentes/question-answer-storage.tsx
  2. 1
      src/components/Componentes/token-switcher.tsx

15
src/components/Componentes/question-answer-storage.tsx

@ -478,12 +478,19 @@ export function QuestionAnswersProvider({
return; return;
} }
const fullPayload = createPayload(answersRef.current, questionsRef.current, backendFieldsRef.current);
const nextDirtyKey = fullPayload.fields.find((field) => dirtyKeysRef.current.has(field.key))?.key;
const fullPayload = createPayload(
answersRef.current,
questionsRef.current,
backendFieldsRef.current,
);
const nextDirtyKey = fullPayload.fields.find((field) =>
dirtyKeysRef.current.has(field.key),
)?.key;
const payload = { const payload = {
...fullPayload, ...fullPayload,
fields: nextDirtyKey ? fullPayload.fields.filter((field) => field.key === nextDirtyKey) : [],
version: schemaVersionRef.current,
fields: nextDirtyKey
? fullPayload.fields.filter((field) => field.key === nextDirtyKey)
: [],
}; };
const revision = answersRevisionRef.current; const revision = answersRevisionRef.current;

1
src/components/Componentes/token-switcher.tsx

@ -1,6 +1,7 @@
"use client"; "use client";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { IoClose, IoKeyOutline, IoTrashOutline } from "react-icons/io5";
import { MdOutlineSwitchAccount } from "react-icons/md"; import { MdOutlineSwitchAccount } from "react-icons/md";
import { IoClose, IoKeyOutline, IoTrashOutline } from "react-icons/io5"; import { IoClose, IoKeyOutline, IoTrashOutline } from "react-icons/io5";
import { getClientCookie, setClientCookie } from "@/lib/cookies"; import { getClientCookie, setClientCookie } from "@/lib/cookies";

Loading…
Cancel
Save