Skip to content

Commit

Permalink
fix:購物車下單成功後會顯示訊息
Browse files Browse the repository at this point in the history
  • Loading branch information
partner0487 committed Dec 26, 2023
1 parent 9068fb4 commit 9302e00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/shopping-cart/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ export default function ShoppingCart() {
console.log("下單成功:", response.data);
setorder([]);
window.location.href = "/my-order";
setOpenSnackbar(true);
}
}
catch (error) {
Expand Down Expand Up @@ -457,15 +458,15 @@ export default function ShoppingCart() {
</Snackbar>
<Snackbar
open={openSnackbar}
autoHideDuration={5000}
autoHideDuration={6000}
onClose={handleCloseSnackbar}
>
<MuiAlert
onClose={handleCloseSnackbar}
severity="success"
sx={{ width: "100%" }}
>
出價成功,請重新整理頁面
下單成功,稍後轉移至訂單
</MuiAlert>
</Snackbar>
</Box >
Expand Down

0 comments on commit 9302e00

Please sign in to comment.