refactor
This commit is contained in:
@@ -206,7 +206,7 @@ export type PayoutMethodFormState = {
|
||||
bankCard?: string | undefined;
|
||||
paymentsType?: 'bank-card' | 'bank-transfer' | 'on-account-balance';
|
||||
} | undefined,
|
||||
error: Record<string, string> | null
|
||||
error: Record<string, string | null> | null
|
||||
};
|
||||
|
||||
export async function addPayoutMethod(
|
||||
|
||||
@@ -49,7 +49,9 @@ export default function SettingReferralProgram() {
|
||||
if (!prevState?.error || !prevState?.error[fieldName]) {
|
||||
return {
|
||||
previousState: prevState?.previousState,
|
||||
error: {}
|
||||
error: {
|
||||
server: null
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -57,7 +59,10 @@ export default function SettingReferralProgram() {
|
||||
|
||||
return {
|
||||
previousState: prevState?.previousState,
|
||||
error: newError
|
||||
error: {
|
||||
...newError,
|
||||
server: null
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user