-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Olasunkanmi Oyinlola
authored and
Olasunkanmi Oyinlola
committed
Apr 18, 2024
1 parent
a5cd62a
commit 474020d
Showing
5 changed files
with
84 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export const ApiResponse = (mutation: any) => { | ||
return ( | ||
<div> | ||
{mutation.isLoading ? ( | ||
"Creating Order..." | ||
) : ( | ||
<> | ||
{mutation.isError ? ( | ||
<div> | ||
An error occurred:{" "} | ||
{mutation.error.response.data.message.message?.length | ||
? mutation.error.response.data.message.message.join(",") | ||
: mutation.error.response.data.message.error} | ||
</div> | ||
) : null} | ||
</> | ||
)} | ||
{mutation.isSuccess ? <div>Order processed successfully</div> : null} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters