Skip to content

Commit c618bdc

Browse files
committed
Fixed TS compile errors
1 parent 6d4152b commit c618bdc

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/frontend/src/pages/ParkingSpaces/components/create-applicant-for-listing/SearchContact.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type SearchContactProps = {
1616
placeholder?: string
1717
onSelect: (contact: ContactSearchData | null) => void
1818
contact: ContactSearchData | null
19-
inputRef: any
19+
inputRef?: React.MutableRefObject<HTMLInputElement | null>
2020
}
2121

2222
export const SearchContact = ({

packages/frontend/src/pages/Residences/Residences.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ const ResidencesPage: React.FC = () => {
203203

204204
const housingReference = customerCard?.applicationProfile?.housingReference
205205

206-
const inputRef = useRef<HTMLInputElement | null>(null)
206+
const searchInputRef = useRef<HTMLInputElement | null>(null)
207207

208208
useEffect(() => {
209-
inputRef.current?.focus()
209+
searchInputRef.current?.focus()
210210
}, [])
211211

212212
return (
@@ -218,7 +218,7 @@ const ResidencesPage: React.FC = () => {
218218
placeholder="Sök på person eller kundnummer"
219219
contact={selectedContact}
220220
onSelect={setSelectedContact}
221-
inputRef={inputRef}
221+
inputRef={searchInputRef}
222222
/>
223223

224224
<Paper

packages/frontend/src/pages/Residences/model/conditional.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const housingFieldMatrix: Record<string, string[]> = {
1+
export const housingFieldMatrix: Record<string, readonly string[]> = {
22
['RENTAL']: [
33
'landlord',
44
'numAdults',
@@ -25,7 +25,7 @@ export const housingFieldMatrix: Record<string, string[]> = {
2525
],
2626
} as const
2727

28-
export const reviewStatusFieldMatrix: Record<string, string[]> = {
28+
export const reviewStatusFieldMatrix: Record<string, readonly string[]> = {
2929
['APPROVED']: [],
3030
['REJECTED']: [
3131
'housingReference.reasonRejected',

packages/frontend/src/utils/transform-model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const setConditionalFields = (
22
source: any,
3-
matrix: Record<string, string[]>,
3+
matrix: Record<string, readonly string[]>,
44
controllerValue: string,
55
target: Record<string, any>
66
) => {

0 commit comments

Comments
 (0)