Skip to content

Commit

Permalink
Merge pull request #263 from theopensystemslab/oz/copy-fixes
Browse files Browse the repository at this point in the history
nit: fix placeholder copy in form
  • Loading branch information
zz-hh-aa authored Jan 10, 2025
2 parents e39dd53 + 8db84c1 commit cb7e61b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
13 changes: 7 additions & 6 deletions app/components/ui/CalculatorInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Household } from "@/app/models/Household";
import Dashboard from "./Dashboard";
import { formSchema, FormFrontend } from "@/app/schemas/formSchema";
import { useSearchParams } from "next/navigation";
import { DEFAULT_INTEREST_RATE, DEFAULT_MORTGAGE_TERM, DEFAULT_INITIAL_DEPOSIT } from "../../models/constants"

import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
import { ClipLoader } from "react-spinners";
Expand Down Expand Up @@ -207,7 +208,7 @@ const CalculatorInput = () => {
</FormLabel>
<FormControl>
<Input
placeholder="e.g. 80 for 80 square meters"
placeholder="e.g. 80 for 80 square metres"
{...field}
value={field.value ?? ""}
className="inputfield-style"
Expand All @@ -229,7 +230,7 @@ const CalculatorInput = () => {
</FormLabel>
<FormControl>
<Input
placeholder="e.g. 1 for a new house"
placeholder="e.g. 0 for a new house"
{...field}
value={field.value ?? ""}
className="inputfield-style"
Expand All @@ -250,7 +251,7 @@ const CalculatorInput = () => {
</FormLabel>
<FormControl>
<Input
placeholder=" e.g. 2 for twp bedrooms"
placeholder=" e.g. 2 for two bedrooms"
{...field}
value={field.value ?? ""}
className="inputfield-style"
Expand Down Expand Up @@ -329,19 +330,19 @@ const CalculatorInput = () => {
<span className="h3-style inaccessible-input-style">
Mortgage interest rate
</span>
<span className="inaccessible-input-style">6%</span>
<span className="inaccessible-input-style">{DEFAULT_INTEREST_RATE * 100}%</span>
</div>
<div className="flex flex-col">
<span className="h3-style inaccessible-input-style">
Mortgage term
</span>
<span className="inaccessible-input-style">25 years</span>
<span className="inaccessible-input-style">{DEFAULT_MORTGAGE_TERM} years</span>
</div>
<div className="flex flex-col">
<span className="h3-style inaccessible-input-style">
Mortgage deposit
</span>
<span className="inaccessible-input-style">25 years</span>
<span className="inaccessible-input-style">{DEFAULT_INITIAL_DEPOSIT * 100}%</span>
</div>
</div>

Expand Down
7 changes: 1 addition & 6 deletions app/models/Mortgage.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import { MONTHS_PER_YEAR } from "./constants";

const DEFAULT_INTEREST_RATE = 0.06;
const DEFAULT_MORTGAGE_TERM = 30;
const DEFAULT_INITIAL_DEPOSIT = 0.15;

import { MONTHS_PER_YEAR, DEFAULT_INTEREST_RATE, DEFAULT_MORTGAGE_TERM, DEFAULT_INITIAL_DEPOSIT } from "./constants";
interface MortgageParams {
propertyValue: number;
interestRate?: number;
Expand Down
4 changes: 4 additions & 0 deletions app/models/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { HouseType } from "./Property";
export const MONTHS_PER_YEAR = 12;
export const WEEKS_PER_MONTH = 4.2;

export const DEFAULT_INTEREST_RATE = 0.06;
export const DEFAULT_MORTGAGE_TERM = 30;
export const DEFAULT_INITIAL_DEPOSIT = 0.15;

export type BedWeightsAndCaps = {
numberOfBedrooms: number[];
weight: number[];
Expand Down

0 comments on commit cb7e61b

Please sign in to comment.