Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3547 | Rev 3659 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3547 Rev 3555
Línea 25... Línea 25...
25
 
25
 
26
export function useCapsule(uuid) {
26
export function useCapsule(uuid) {
Línea 27... Línea 27...
27
  const [capsule, setCapsule] = useState(DEFAULT_STATE);
27
  const [capsule, setCapsule] = useState(DEFAULT_STATE);
28
 
28
 
Línea 29... Línea 29...
29
  const { showSuccess, showError } = useAlert();
29
  const { showSuccess, showError } = useAlert();
Línea 30... Línea 30...
30
  const { showAlert } = useAlertModal();
30
  const { showAlert, closeAlert } = useAlertModal();
31
 
31
 
Línea 41... Línea 41...
41
        } = await addCapsuleComment(capsule.link_comment_add, {
41
        } = await addCapsuleComment(capsule.link_comment_add, {
42
          comment,
42
          comment,
43
          rating
43
          rating
44
        });
44
        });
45
        showSuccess(message);
45
        showSuccess(message);
-
 
46
        closeAlert();
46
        setCapsule((prev) => ({
47
        setCapsule((prev) => ({
47
          ...prev,
48
          ...prev,
48
          ...updatedCapsule,
49
          ...updatedCapsule,
49
          comments: [newComment, ...prev.comments]
50
          comments: [newComment, ...prev.comments]
50
        }));
51
        }));