Skip to content

Commit

Permalink
chore: self review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JuroUhlar committed Sep 19, 2024
1 parent 89673ac commit 3a30def
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/loan-risk/LoanRisk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ export function LoanRisk() {
<UseCaseWrapper useCase={USE_CASES.loanRisk}>
<div className={classNames(formStyles.wrapper, styles.formWrapper)}>
<form
onSubmit={(event) => () => {
onSubmit={async (event) => {
event.preventDefault();
requestLoan({
await requestLoan({
firstName,
lastName,
loanValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type LoanResult = {
approved: boolean;
};

export function calculateLoanValues({ loanValue, monthlyIncome, loanDuration }: LoanAsk): LoanResult {
export function evaluateLoanRequest({ loanValue, monthlyIncome, loanDuration }: LoanAsk): LoanResult {
const monthInstallment = calculateMonthInstallment({ loanValue, loanDuration });
const remainingIncome = monthlyIncome - monthInstallment;

Expand Down
2 changes: 1 addition & 1 deletion src/app/loan-risk/api/request-loan/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Severity, getAndValidateFingerprintResult } from '../../../../server/ch
import { NextResponse } from 'next/server';
import { LoanRequestDbModel } from './database';
import { LOAN_RISK_COPY } from './copy';
import { calculateLoanValues as evaluateLoanRequest, LoanResult } from './calculate-loan-values';
import { evaluateLoanRequest, LoanResult } from './evaluateLoanRequest';

export type LoanRequestData = {
firstName: string;
Expand Down

0 comments on commit 3a30def

Please sign in to comment.