mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 20:35:07 +03:00
smol
This commit is contained in:
1 parent
95f901864e
commit
556db8acce
2 files changed
+2
-5
No files matched your search
+1
-1
@@ -178,7 +178,7 @@ export const CreditCodeRedemption = ({ slug }: { slug: string | undefined }) =>
|
||||
name="code"
|
||||
render={({ field }) => (
|
||||
<FormItemLayout label="Code" className="gap-1">
|
||||
<Input_Shadcn_ {...field} placeholder="100" />
|
||||
<Input_Shadcn_ {...field} className="uppercase" />
|
||||
</FormItemLayout>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { useMutation } from '@tanstack/react-query'
|
||||
import { toast } from 'sonner'
|
||||
|
||||
import { handleError, post } from 'data/fetchers'
|
||||
import type { ResponseError, UseCustomMutationOptions } from 'types'
|
||||
@@ -64,9 +63,7 @@ export const useOrganizationCreditCodeRedemptionMutation = ({
|
||||
await onSuccess?.(data, variables, context)
|
||||
},
|
||||
async onError(data, variables, context) {
|
||||
if (onError === undefined) {
|
||||
toast.error(`Failed to redeem code: ${data.message}`)
|
||||
} else {
|
||||
if (onError !== undefined) {
|
||||
onError(data, variables, context)
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user