Skip to content

Commit

Permalink
[Tech] delete useless ref
Browse files Browse the repository at this point in the history
  • Loading branch information
claire2212 committed Nov 28, 2024
1 parent 83adc7f commit 5db8a06
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { FormikDatePicker, FormikNumberInput, customDayjs, getLocalizedDayjs, us
import { ReportingStatusEnum, type Reporting, getReportingStatus } from 'domain/entities/reporting'
import { ReportingContext } from 'domain/shared_slices/Global'
import { useFormikContext } from 'formik'
import { forwardRef, useMemo } from 'react'
import { useMemo } from 'react'
import styled from 'styled-components'

type ValidityProps = {
mustIncreaseValidity: boolean
reportingContext: ReportingContext
}

export const Validity = forwardRef<HTMLDivElement, ValidityProps>(({ mustIncreaseValidity, reportingContext }, ref) => {
export function Validity({ mustIncreaseValidity, reportingContext }: ValidityProps) {
const { newWindowContainerRef } = useNewWindow()

const { values } = useFormikContext<Reporting>()
Expand All @@ -35,7 +35,7 @@ export const Validity = forwardRef<HTMLDivElement, ValidityProps>(({ mustIncreas
)

return (
<StyledValidityContainer ref={ref}>
<StyledValidityContainer>
<div>
<FormikDatePicker
baseContainer={reportingContext === ReportingContext.SIDE_WINDOW ? newWindowContainerRef.current : undefined}
Expand Down Expand Up @@ -73,7 +73,7 @@ export const Validity = forwardRef<HTMLDivElement, ValidityProps>(({ mustIncreas
)}
</StyledValidityContainer>
)
})
}

const StyledFormikNumberInput = styled(FormikNumberInput)`
max-width: 80px;
Expand Down

0 comments on commit 5db8a06

Please sign in to comment.