Skip to content

Commit

Permalink
Merge pull request #38 from UniqueClone/main
Browse files Browse the repository at this point in the history
Fixing local storage bug when user makes fee empty and refreshes page.
  • Loading branch information
UniqueClone authored Jul 29, 2024
2 parents c1196af + 4659110 commit 9852af7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/FeesPanel/FeesPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const FeesPanel: React.FC<FeesPanelProps> = (props: FeesPanelProps) => {
label="Valuation Fee"
prefix="€"
type="number"
value={fees.valuationFee.toString()}
value={fees.valuationFee?.toString()}
onChange={(_, newValue) =>
setFees({
...fees,
Expand All @@ -51,7 +51,7 @@ export const FeesPanel: React.FC<FeesPanelProps> = (props: FeesPanelProps) => {
label="Survey Fee"
prefix="€"
type="number"
value={fees.surveyFee.toString()}
value={fees.surveyFee?.toString()}
onChange={(_, newValue) =>
setFees({
...fees,
Expand Down Expand Up @@ -84,7 +84,7 @@ export const FeesPanel: React.FC<FeesPanelProps> = (props: FeesPanelProps) => {
root: { marginTop: "0.5rem !important" },
}}
type="number"
value={fees.legalFee.toString()}
value={fees.legalFee?.toString()}
onChange={(_, newValue) =>
setFees({
...fees,
Expand All @@ -97,7 +97,7 @@ export const FeesPanel: React.FC<FeesPanelProps> = (props: FeesPanelProps) => {
label="Law Searches Fee"
prefix="€"
type="number"
value={fees.searchFee.toString()}
value={fees.searchFee?.toString()}
onChange={(_, newValue) =>
setFees({
...fees,
Expand All @@ -110,7 +110,7 @@ export const FeesPanel: React.FC<FeesPanelProps> = (props: FeesPanelProps) => {
label="Register of Deeds Fee"
prefix="€"
type="number"
value={fees.registerOfDeedsFee.toString()}
value={fees.registerOfDeedsFee?.toString()}
onChange={(_, newValue) =>
setFees({
...fees,
Expand All @@ -123,7 +123,7 @@ export const FeesPanel: React.FC<FeesPanelProps> = (props: FeesPanelProps) => {
label="Land Registry Fee"
prefix="€"
type="number"
value={fees.landRegistryFee.toString()}
value={fees.landRegistryFee?.toString()}
onChange={(_, newValue) =>
setFees({
...fees,
Expand Down

0 comments on commit 9852af7

Please sign in to comment.