Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
fix: Creating dynamic discounts (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
olivermrbl authored Aug 17, 2021
1 parent 800e45c commit 0ddb4e3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/domain/discounts/new/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ const NewDiscount = ({}) => {

Medusa.discounts
.create(discount)
.then(() => toaster("Successfully created discount", "success"))
.then(() => navigate("/a/discounts"))
.then(() => {
toaster("Successfully created discount", "success")
navigate("/a/discounts")
})
.catch(() => toaster("Error creating discount", "error"))
}

Expand Down Expand Up @@ -253,8 +255,8 @@ const NewDiscount = ({}) => {
<input
type="radio"
ref={register({ required: true })}
id="dynamic_true"
name="dynamic_true"
id="is_dynamic"
name="is_dynamic"
value="false"
style={{ marginRight: "5px" }}
/>
Expand All @@ -269,8 +271,8 @@ const NewDiscount = ({}) => {
type="radio"
disabled={isFreeShipping}
ref={register({ required: true })}
id="dynamic_true"
name="dynamic_true"
id="is_dynamic"
name="is_dynamic"
value="true"
style={{ marginRight: "5px" }}
/>
Expand Down

0 comments on commit 0ddb4e3

Please sign in to comment.