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

fix: ui tweaks for setting own price #882

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function BudgetField() {
.
</Typography>
) : (
<Stack direction="row" spacing={2} alignItems="center">
<Stack direction="column" spacing={2} alignItems="flex-start">
<FormikTextField
fullWidth={false}
name="price"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { FormikSubmitButton, useIsEdit } from "form/FormikHelpers";
import { useAdvertiser } from "auth/hooks/queries/useAdvertiser";

export function PaymentButton(props: { hasPaymentIntent: boolean }) {
const { advertiser } = useAdvertiser();
const { isEdit } = useIsEdit();
const paymentText = "Make payment & submit for approval";

console.log();
return (
<FormikSubmitButton
isCreate={!props.hasPaymentIntent || !isEdit}
label={
props.hasPaymentIntent
props.hasPaymentIntent || advertiser.selfServiceSetPrice
? `${isEdit ? "Update" : "Create"} & Submit For Approval`
: paymentText
}
Expand Down