diff --git a/src/modules/project/pages1/projectView/hooks/useProjectGoalForm.tsx b/src/modules/project/pages1/projectView/hooks/useProjectGoalForm.tsx index 2688e47cc..aa6e58338 100644 --- a/src/modules/project/pages1/projectView/hooks/useProjectGoalForm.tsx +++ b/src/modules/project/pages1/projectView/hooks/useProjectGoalForm.tsx @@ -63,7 +63,7 @@ export const useProjectGoalForm = ({ goal, projectId, onClose }: UseProjectGoalF const navigate = useNavigate() const toast = useNotification() - const isBTC = goal?.currency === ProjectGoalCurrency.Btcsat + let isBTC = goal?.currency === ProjectGoalCurrency.Btcsat const amountContributed = isBTC ? goal?.amountContributed || 0 : (goal?.amountContributed || 0) / 100 const { control, handleSubmit, reset, watch, formState, setValue, trigger } = useForm({ @@ -109,6 +109,10 @@ export const useProjectGoalForm = ({ goal, projectId, onClose }: UseProjectGoalF const onSubmit = (formData: FormValues) => { try { + if (!goal) { + isBTC = formData.currency === ProjectGoalCurrency.Btcsat + } + const trimmedTitle = typeof formData.title === 'string' ? formData.title.trim() : '' const targetAmount = isBTC ? formData.targetAmount : dollarsToCents(Number(formData.targetAmount)) diff --git a/src/modules/project/pages1/projectView/views/goals/components/GoalTarget.tsx b/src/modules/project/pages1/projectView/views/goals/components/GoalTarget.tsx index 8cf1a79da..d5d417f2d 100644 --- a/src/modules/project/pages1/projectView/views/goals/components/GoalTarget.tsx +++ b/src/modules/project/pages1/projectView/views/goals/components/GoalTarget.tsx @@ -26,7 +26,7 @@ export const GoalTarget = ({ goal, of }: GoalTargetProps) => { return ( - {of ? ` ${t('of')}: ` : ''} + {of ? ` ${t('of')} ` : ''} {formattedTargetAmount}{' '} diff --git a/src/modules/project/pages1/projectView/views/rewards/shared/ProjectRewardForm.tsx b/src/modules/project/pages1/projectView/views/rewards/shared/ProjectRewardForm.tsx index 63be30c7f..166beec56 100644 --- a/src/modules/project/pages1/projectView/views/rewards/shared/ProjectRewardForm.tsx +++ b/src/modules/project/pages1/projectView/views/rewards/shared/ProjectRewardForm.tsx @@ -490,7 +490,7 @@ export const ProjectRewardForm = ({ {reward.preOrder ? ( -
+