Skip to content

Commit

Permalink
fix typing for BasicInfoEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
henrinie-nc committed Oct 28, 2024
1 parent 953a2a8 commit bd4a4b4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/leases/components/leaseSections/rent/BasicInfoEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type SeasonalDatesProps = {
seasonalStartMonth: string | null | undefined;
};

const SeasonalDates = connect((state, props: Props) => {
const SeasonalDates = connect((state, props: Omit<SeasonalDatesProps, "seasonalStartDay" | "seasonalEndDay" | "seasonalStartMonth" | "seasonalEndMonth">) => {
return {
seasonalEndDay: selector(state, `${props.field}.seasonal_end_day`),
seasonalEndMonth: selector(state, `${props.field}.seasonal_end_month`),
Expand Down Expand Up @@ -204,7 +204,7 @@ type BasicInfoIndexOrManualProps = {
isSaveClicked: boolean;
leaseAttributes: Attributes;
usersPermissions: UsersPermissionsType;
yearlyDueDates: Array<Record<string, any>>;
yearlyDueDates: Array<DueDate>;
};

const BasicInfoIndexOrManual = ({
Expand Down Expand Up @@ -390,7 +390,7 @@ type BasicInfoFixedProps = {
isSaveClicked: boolean;
leaseAttributes: Attributes;
usersPermissions: UsersPermissionsType;
yearlyDueDates: Array<Record<string, any>>;
yearlyDueDates: Array<DueDate>;
};

const BasicInfoFixed = ({
Expand Down Expand Up @@ -568,7 +568,13 @@ const BasicInfoEdit = ({
</Fragment>;
};

export default connect((state, props) => {
type BasicInfoEditProps = {
field: string;
isSaveClicked: boolean;
rentType: string;
}

export default connect((state, props: BasicInfoEditProps) => {
return {
currentLease: getCurrentLease(state),
cycle: selector(state, `${props.field}.cycle`),
Expand Down

0 comments on commit bd4a4b4

Please sign in to comment.