Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle succesPayload messages in the Deck representation #2984

Closed
4 tasks done
florianbarbin opened this issue Jan 23, 2024 · 0 comments · Fixed by #2992
Closed
4 tasks done

Handle succesPayload messages in the Deck representation #2984

florianbarbin opened this issue Jan 23, 2024 · 0 comments · Fixed by #2992

Comments

@florianbarbin
Copy link
Contributor

  • I have checked that this bug has not yet been reported by someone else
  • I have checked that this bug appears on Chrome
  • I have specified the version :
  • latest
  • I have specified my environment :
  • All

Screenshots

...

Steps to reproduce

...

Expected behavior

We should use something like this in DeclRepresentation.tsx:

  const { addErrorMessage, addMessages } = useMultiToast();

  useEffect(() => {
    if (!loading) {
      if (error) {
        addErrorMessage('An unexpected error has occurred, please refresh the page');
      }
      if (data) {
        const { editRadio } = data;
        if (isErrorPayload(editRadio) || isSuccessPayload(editRadio)) {
          addMessages(editRadio.messages);
        }
      }
    }
  }, [loading, error, data]);

...

Actual behavior

...

@florianbarbin florianbarbin added this to the 2024.3.0 milestone Jan 23, 2024
@florianbarbin florianbarbin self-assigned this Jan 23, 2024
@florianbarbin florianbarbin changed the title Handle messages that could be returned by the server in case of succes payload in the Deck representation Handle succesPayload messages in the Deck representation Jan 23, 2024
florianbarbin added a commit that referenced this issue Jan 23, 2024
Bug: #2984
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
@florianbarbin florianbarbin linked a pull request Jan 23, 2024 that will close this issue
39 tasks
florianbarbin added a commit that referenced this issue Jan 24, 2024
Bug: #2984
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
frouene pushed a commit that referenced this issue Jan 24, 2024
Bug: #2984
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
Signed-off-by: Florian ROUËNÉ <florian.rouene@obeosoft.com>
frouene pushed a commit that referenced this issue Jan 25, 2024
Bug: #2984
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
Signed-off-by: Florian ROUËNÉ <florian.rouene@obeosoft.com>
frouene pushed a commit that referenced this issue Jan 25, 2024
Bug: #2984
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
Signed-off-by: Florian ROUËNÉ <florian.rouene@obeosoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant