From 790040d4e9c1c3fec1dfab2cc41eb47f3c8a05e8 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja <pritish.budhiraja@gmail.com> Date: Mon, 16 Sep 2024 16:41:19 +0530 Subject: [PATCH] chore: unused vars removed (#1383) --- src/components/Accordion.res | 2 +- src/components/Calendar.res | 4 ++-- src/components/CardTable.res | 4 ++-- src/components/Chip.res | 2 +- src/components/DatePicker.res | 2 +- src/components/DateRangeField.res | 10 +++++----- src/components/DateRangePicker.res | 10 +++++----- src/components/DynamicChart.res | 4 ++-- src/components/DynamicFilter.res | 2 +- src/components/DynamicTabs.res | 8 ++++---- src/components/Filter.res | 2 +- src/components/FilterSelectBox.res | 12 +++++------ src/components/HeadlessUISelectBox.res | 8 ++++---- src/components/InfraCalendar.res | 2 +- src/components/InfraCalendarList.res | 4 ++-- src/components/NewCalendar.res | 4 ++-- src/components/NewPagination.res | 10 +++++----- src/components/Pagination.res | 12 +++++------ src/components/Paginator.res | 4 ++-- src/components/ReactWindowTable.res | 8 ++++---- src/components/RippleEffectBackground.res | 4 ++-- src/components/SelectBox.res | 12 +++++------ src/components/SelectModal.res | 4 ++-- src/components/SnackBarContainer.res | 2 +- src/components/Table.res | 14 ++++++------- src/components/TableLocalFilters.res | 18 ++++++++--------- src/components/TableUtils.res | 8 ++++---- src/components/Tabs.res | 6 +++--- src/components/TabularInput.res | 6 +++--- src/components/form/BoolInput.res | 2 +- src/components/form/FormRenderer.res | 4 ++-- src/components/form/MultipleTextInput.res | 4 ++-- src/components/modal/ModalContainer.res | 4 ++-- .../priority-logics/AddPLGateway.res | 4 ++-- src/components/tooltip/ToolTip.res | 8 ++++---- src/context/BetaEndPointConfigProvider.res | 2 +- src/context/ThemeProvider.res | 4 ++-- src/context/TokenContextProvider.res | 4 ++-- src/context/UserTimeZoneProvider.res | 2 +- .../AuthModule/AuthModuleHooks.res | 2 +- .../AuthModule/TwoFaAuth/TwoFaElements.res | 4 ++-- src/libraries/HeadlessUI.res | 6 +++--- src/libraries/ReactFinalForm.res | 10 +++++----- src/screens/Analytics/Analytics.res | 10 ++++------ src/screens/Analytics/AnalyticsNew.res | 4 +--- src/screens/Analytics/AnalyticsUtils.res | 2 +- .../DisputeAnalyticsEntity.res | 5 +---- src/screens/Analytics/HSAnalyticsUtils.res | 2 +- .../PaymentAnalyticsEntity.res | 5 +---- .../RefundsAnalyticsEntity.res | 5 +---- .../ConfigurePMTs/PaymentMethodConfig.res | 4 ++-- .../ConnectPayPalFlow/ConnectPayPal.res | 2 +- .../ConnectPayPalFlow/MenuOptionForPayPal.res | 2 +- .../ConnectorAccountDetailsHelper.res | 6 +++--- .../PlaidAdditionalMerchantData.res | 4 ++-- .../ApplePay/ApplePayIntegration.res | 16 +++++++-------- .../ApplePay/ApplePayManualFlow.res | 4 ++-- .../ApplePay/ApplePaySimplifiedFlow.res | 4 ++-- .../ApplePay/ApplePayZen.res | 4 ++-- .../ConnectorMetaData/BankDebit/BankDebit.res | 4 ++-- .../GooglePay/GooglePayIntegration.res | 4 ++-- src/screens/Connectors/ConnectorPreview.res | 4 ++-- .../FraudAndRisk/FRMIntegrationFields.res | 4 ++-- src/screens/HSwitchRemoteFilter.res | 4 ++-- src/screens/Helpers/TableSearchFilter.res | 4 ++-- .../NewAnalytics/NewAnalyticsHelper.res | 4 ++-- .../PMAuthenticationHome.res | 2 +- src/screens/Recon/ReconModule.res | 2 +- src/screens/Routing/RoutingUtils.res | 2 +- src/screens/RoutingRevamp/AddRuleGateway.res | 4 ++-- .../RoutingRevamp/AdvancedRoutingUIUtils.res | 20 +++++++++---------- src/screens/SDKPayment/WebSDK.res | 2 +- .../SbxOnboardingSurvey.res | 4 ++-- src/screens/Sidebar/Sidebar.res | 2 +- src/screens/SwitchMerchant/SwitchMerchant.res | 4 ++-- .../ThreeDsProcessorHome.res | 2 +- .../OldUserManagement/ShowUserData.res | 2 +- .../UserRevamp/ManageUserModal.res | 4 ++-- src/utils/BreadCrumbNavigation.res | 2 +- src/utils/Modal.res | 4 ++-- 80 files changed, 199 insertions(+), 212 deletions(-) diff --git a/src/components/Accordion.res b/src/components/Accordion.res index d5d1f00a7..c0418cb32 100644 --- a/src/components/Accordion.res +++ b/src/components/Accordion.res @@ -87,7 +87,7 @@ module AccordionInfo = { ) => { let (isExpanded, setIsExpanded) = React.useState(() => expanded) - let handleClick = _e => { + let handleClick = _ => { setIsExpanded(prevExpanded => !prevExpanded) } diff --git a/src/components/Calendar.res b/src/components/Calendar.res index e810efb39..d997c106d 100644 --- a/src/components/Calendar.res +++ b/src/components/Calendar.res @@ -116,7 +116,7 @@ module TableRow = { | None => true } - let onClick = _evt => { + let onClick = _ => { let isClickDisabled = (endDate->isEmptyString && !isInLimit) || (isFutureDate ? disableFutureDates : disablePastDates) || @@ -252,7 +252,7 @@ module TableRow = { className={classN} onClick onMouseOver={_ => handleHover()} - onMouseOut={_evt => setHoverdDate(_ => "")}> + onMouseOut={_ => setHoverdDate(_ => "")}> <AddDataAttributes attributes=[ ( diff --git a/src/components/CardTable.res b/src/components/CardTable.res index 9a02745e6..5fa972f3b 100644 --- a/src/components/CardTable.res +++ b/src/components/CardTable.res @@ -44,7 +44,7 @@ module CardDetails = { ~isAnalyticsModule, ) => { let {globalUIConfig: {font: {textColor}}} = React.useContext(ThemeProvider.themeContext) - let onCardClick = _ev => { + let onCardClick = _ => { switch onRowClick { | Some(fn) => fn(rowIndex + offset) | None => () @@ -53,7 +53,7 @@ module CardDetails = { let (show, setshow) = React.useState(_ => true) - let showMore = _ev => { + let showMore = _ => { setshow(prev => !prev) } diff --git a/src/components/Chip.res b/src/components/Chip.res index c6b50b3b4..4b1c66bf2 100644 --- a/src/components/Chip.res +++ b/src/components/Chip.res @@ -4,7 +4,7 @@ let make = (~values=[], ~showButton=false, ~onButtonClick=_ => (), ~converterFn= <div className="flex flex-wrap flex-row"> {values ->Array.map(value => { - let onClick = _evt => { + let onClick = _ => { onButtonClick(value) } <div diff --git a/src/components/DatePicker.res b/src/components/DatePicker.res index 3429ce143..76b6e5f51 100644 --- a/src/components/DatePicker.res +++ b/src/components/DatePicker.res @@ -112,7 +112,7 @@ let make = ( setIsExpanded(p => !p) }, ) - let changeVisibility = _ev => { + let changeVisibility = _ => { if !isDisabled { setIsExpanded(p => !p) } diff --git a/src/components/DateRangeField.res b/src/components/DateRangeField.res index d6b6d0863..4518cbd47 100644 --- a/src/components/DateRangeField.res +++ b/src/components/DateRangeField.res @@ -400,7 +400,7 @@ module Base = { changeStartDate(str, true, None) } - let handleApply = _ev => { + let handleApply = _ => { setShowOption(_ => false) setCalendarVisibility(p => !p) setIsDropdownExpanded(_ => false) @@ -440,7 +440,7 @@ module Base = { } let startTimeInput: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: timeValEv => { let startTimeVal = timeValEv->Identity.formReactEventToString let endTime = localEndDate->getTimeStringForValue(isoStringToCustomTimeZone) @@ -457,13 +457,13 @@ module Base = { } } }, - onFocus: _ev => (), + onFocus: _ => (), value: localStartDate->getTimeStringForValue(isoStringToCustomTimeZone)->JSON.Encode.string, checked: false, } let endTimeInput: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: timeValEv => { let endTimeVal = timeValEv->Identity.formReactEventToString let startTime = localStartDate->getTimeStringForValue(isoStringToCustomTimeZone) @@ -479,7 +479,7 @@ module Base = { } } }, - onFocus: _ev => (), + onFocus: _ => (), value: localEndDate->getTimeStringForValue(isoStringToCustomTimeZone)->JSON.Encode.string, checked: false, } diff --git a/src/components/DateRangePicker.res b/src/components/DateRangePicker.res index 227fc9725..70a32a6a4 100644 --- a/src/components/DateRangePicker.res +++ b/src/components/DateRangePicker.res @@ -403,7 +403,7 @@ module Base = { changeStartDate(str, true, None) } - let handleApply = _ev => { + let handleApply = _ => { setShowOption(_ => false) setCalendarVisibility(p => !p) setIsDropdownExpanded(_ => false) @@ -443,7 +443,7 @@ module Base = { } let startTimeInput: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: timeValEv => { let startTimeVal = timeValEv->Identity.formReactEventToString let endTime = localEndDate->getTimeStringForValue(isoStringToCustomTimeZone) @@ -460,13 +460,13 @@ module Base = { } } }, - onFocus: _ev => (), + onFocus: _ => (), value: localStartDate->getTimeStringForValue(isoStringToCustomTimeZone)->JSON.Encode.string, checked: false, } let endTimeInput: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: timeValEv => { let endTimeVal = timeValEv->Identity.formReactEventToString let startTime = localStartDate->getTimeStringForValue(isoStringToCustomTimeZone) @@ -482,7 +482,7 @@ module Base = { } } }, - onFocus: _ev => (), + onFocus: _ => (), value: localEndDate->getTimeStringForValue(isoStringToCustomTimeZone)->JSON.Encode.string, checked: false, } diff --git a/src/components/DynamicChart.res b/src/components/DynamicChart.res index 06e8848d2..313103c4f 100644 --- a/src/components/DynamicChart.res +++ b/src/components/DynamicChart.res @@ -324,7 +324,7 @@ module GranularitySelectBox = { open HeadlessUI <> <Menu \"as"="div" className="relative inline-block text-left"> - {_menuProps => + {_ => <div> <Menu.Button className="inline-flex whitespace-pre leading-5 justify-center text-sm px-3 py-1 font-medium rounded-md hover:bg-opacity-80 bg-white border"> @@ -352,7 +352,7 @@ module GranularitySelectBox = { leaveTo="transform opacity-0 scale-95"> {<Menu.Items className="absolute right-0 z-50 w-36 mt-2 origin-top-right bg-white dark:bg-jp-gray-950 divide-y divide-gray-100 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none"> - {_props => { + {_ => { <> <div className="px-1 py-1 "> {options diff --git a/src/components/DynamicFilter.res b/src/components/DynamicFilter.res index f08056af7..929f361ad 100644 --- a/src/components/DynamicFilter.res +++ b/src/components/DynamicFilter.res @@ -189,7 +189,7 @@ let make = ( buttonSize=Small leftIcon={CustomIcon(<Icon name="add_custom_img" size=14 />)} textStyle={`${textColor.primaryNormal}`} - onClick={_ev => setShowModal(_ => true)} + onClick={_ => setShowModal(_ => true)} /> </div> <Modal diff --git a/src/components/DynamicTabs.res b/src/components/DynamicTabs.res index 9984bf81a..965c60061 100644 --- a/src/components/DynamicTabs.res +++ b/src/components/DynamicTabs.res @@ -59,7 +59,7 @@ module TabInfo = { } else { "text-jp-gray-700 dark:text-jp-gray-tabset_gray dark:text-opacity-75 hover:text-jp-gray-800 dark:hover:text-opacity-100 font-medium" } - let handleClick = React.useCallback(_ev => { + let handleClick = React.useCallback(_ => { handleSelectedTab( ~tabValue={ switch tabNames->Array.get(index) { @@ -171,7 +171,7 @@ module IndicationArrow = { let make = (~iconName, ~side, ~refElement: React.ref<Js.nullable<Dom.element>>, ~isVisible) => { let isMobileView = MatchMedia.useMobileChecker() let onClick = { - _ev => + _ => refElement.current ->Nullable.toOption ->Option.forEach(input => @@ -399,7 +399,7 @@ let make = ( let scrollRef = React.useRef(Nullable.null) let lastTabRef = React.useRef(Nullable.null) - let onScroll = _ev => { + let onScroll = _ => { setTabScroll( firstTabRef, lastTabRef, @@ -595,7 +595,7 @@ let make = ( buttonSize=Small customButtonStyle=addBtnStyle textStyle=addBtnTextStyle - onClick={_ev => setShowModal(_ => true)} + onClick={_ => setShowModal(_ => true)} />} toolTipPosition=Top tooltipWidthClass="w-fit" diff --git a/src/components/Filter.res b/src/components/Filter.res index 3655f41f3..8267a4f55 100644 --- a/src/components/Filter.res +++ b/src/components/Filter.res @@ -126,7 +126,7 @@ let make = ( ~path="", ~remoteFilters: array<EntityType.initialFilters<'t>>, ~remoteOptions: array<EntityType.optionType<'t>>, - ~localOptions as _: array<EntityType.optionType<'t>>, + ~localOptions as _, ~localFilters: array<EntityType.initialFilters<'t>>, ~mandatoryRemoteKeys=[], ~popupFilterFields: array<EntityType.optionType<'t>>=[], diff --git a/src/components/FilterSelectBox.res b/src/components/FilterSelectBox.res index 59c8cc9e8..cd8cc1052 100644 --- a/src/components/FilterSelectBox.res +++ b/src/components/FilterSelectBox.res @@ -539,7 +539,7 @@ module BaseSelect = { setSearchString(_ => str) } - let selectAll = select => _ev => { + let selectAll = select => _ => { let newValues = if select { let newVal = filteredOptions @@ -901,7 +901,7 @@ module BaseSelectButton = { let (itemdata, setItemData) = React.useState(() => "") let (assignButtonState, setAssignButtonState) = React.useState(_ => false) let searchRef = React.useRef(Nullable.null) - let onItemClick = itemData => _ev => { + let onItemClick = itemData => _ => { if !disableSelect { let isSelected = value->JSON.Decode.string->Option.mapOr(false, str => itemData === str) @@ -1212,7 +1212,7 @@ module BaseRadio = { setSearchString(_ => "") }, ) - let onItemClick = (itemData, isDisabled) => _ev => { + let onItemClick = (itemData, isDisabled) => _ => { if !isDisabled { let isSelected = value->JSON.Decode.string->Option.mapOr(false, str => itemData === str) @@ -1612,7 +1612,7 @@ module BaseDropdown = { } } - let removeOption = text => _ev => { + let removeOption = text => _ => { let actualValue = switch Array.find(transformedOptions, option => option.value == text) { | Some(str) => str.value | None => "" @@ -1682,8 +1682,8 @@ module BaseDropdown = { | TopLeft | TopRight => "mb-12" } - let onRadioOptionSelect = _ev => { - newInputRadio.onChange(_ev) + let onRadioOptionSelect = ev => { + newInputRadio.onChange(ev) addButton ? setShowDropDown(_ => true) : setShowDropDown(_ => false) } diff --git a/src/components/HeadlessUISelectBox.res b/src/components/HeadlessUISelectBox.res index ae71801ac..17ba83c8c 100644 --- a/src/components/HeadlessUISelectBox.res +++ b/src/components/HeadlessUISelectBox.res @@ -38,9 +38,9 @@ let make = ( <div className="text-left"> <AddDataAttributes attributes=[("data-testid", "profile")]> <Menu \"as"="div" className="relative inline-block text-left"> - {_menuProps => + {_ => <div> - <Menu.Button className> {_buttonProps => children} </Menu.Button> + <Menu.Button className> {_ => children} </Menu.Button> <Transition \"as"="span" enter="transition ease-out duration-100" @@ -53,7 +53,7 @@ let make = ( <BottomModal headerText="Select Action" onCloseClick=closeClick> <Menu.Items className={`w-full p-1 origin-top-right bg-white dark:bg-jp-gray-950 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none`}> - {_props => + {_ => options ->Array.mapWithIndex((option, index) => { let selected = switch value { @@ -137,7 +137,7 @@ let make = ( } else { <Menu.Items className={`absolute z-10 ${dropdownPositionClass} mt-2 p-1 origin-top-right bg-white dark:bg-jp-gray-950 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none ${dropDownClass}`}> - {_props => + {_ => options ->Array.mapWithIndex((option, index) => { let selected = switch value { diff --git a/src/components/InfraCalendar.res b/src/components/InfraCalendar.res index b1105f63c..576663111 100644 --- a/src/components/InfraCalendar.res +++ b/src/components/InfraCalendar.res @@ -68,7 +68,7 @@ module TableRow = { ) let isFutureDate = todayInitial -. date->Date.getTime < 0.0 - let onClick = _evt => { + let onClick = _ => { let isClickDisabled = isFutureDate ? disableFutureDates : disablePastDates switch !isClickDisabled { | true => diff --git a/src/components/InfraCalendarList.res b/src/components/InfraCalendarList.res index 096a8a7af..af2b28184 100644 --- a/src/components/InfraCalendarList.res +++ b/src/components/InfraCalendarList.res @@ -130,8 +130,8 @@ module MonthItem = { open InfraCalendar @react.component let make = ( - ~month as _: option<month>=?, - ~year as _: option<int>=?, + ~month as _, + ~year as _, ~onDateClick=?, ~cellHighlighter=?, ~cellRenderer=?, diff --git a/src/components/NewCalendar.res b/src/components/NewCalendar.res index 74b32e9fc..1506aecd2 100644 --- a/src/components/NewCalendar.res +++ b/src/components/NewCalendar.res @@ -97,7 +97,7 @@ module TableRow = { | None => true } - let onClick = _evt => { + let onClick = _ => { switch setIsDateClicked { | Some(setIsDateClicked) => setIsDateClicked(_ => true) | _ => () @@ -308,7 +308,7 @@ module TableRow = { className={`${classN} ${highlightBgClass} text-sm font-normal`} onClick onMouseOver={_ => handleHover()} - onMouseOut={_evt => setHoverdDate(_ => "")}> + onMouseOut={_ => setHoverdDate(_ => "")}> <AddDataAttributes attributes=[ ( diff --git a/src/components/NewPagination.res b/src/components/NewPagination.res index 427e8496a..1cf5d92b6 100644 --- a/src/components/NewPagination.res +++ b/src/components/NewPagination.res @@ -23,13 +23,13 @@ let make = (~resultsPerPage, ~totalResults, ~currentPage, ~paginate, ~btnCount=4 name="chevron-left" className="fill-ardra-secondary-300" size=16 - onClick={_evt => paginate(Math.Int.max(1, currentPage - 1))} + onClick={_ => paginate(Math.Int.max(1, currentPage - 1))} /> } else { <Icon name="leftDisabledPaginator" size=16 - onClick={_evt => paginate(Math.Int.max(1, currentPage - 1))} + onClick={_ => paginate(Math.Int.max(1, currentPage - 1))} /> }} {pageNumbers @@ -39,7 +39,7 @@ let make = (~resultsPerPage, ~totalResults, ~currentPage, ~paginate, ~btnCount=4 <Button key={idx->Int.toString} text={number->Int.toString} - onClick={_evt => paginate(number)} + onClick={_ => paginate(number)} buttonType={Pill} customButtonStyle="rounded-[4px] w-[39px] h-[36px]" textStyle="text-[#0E111E] text-[14px]" @@ -49,9 +49,9 @@ let make = (~resultsPerPage, ~totalResults, ~currentPage, ~paginate, ~btnCount=4 }) ->React.array} {if currentPage < Array.length(pageNumbers) { - <Icon name="chevron-right" size=16 onClick={_evt => paginate(currentPage + 1)} /> + <Icon name="chevron-right" size=16 onClick={_ => paginate(currentPage + 1)} /> } else { - <Icon name="rightDisabledPaginator" size=16 onClick={_evt => paginate(currentPage + 1)} /> + <Icon name="rightDisabledPaginator" size=16 onClick={_ => paginate(currentPage + 1)} /> }} </ButtonGroup> } diff --git a/src/components/Pagination.res b/src/components/Pagination.res index 1a1a274bf..294658498 100644 --- a/src/components/Pagination.res +++ b/src/components/Pagination.res @@ -63,7 +63,7 @@ let make = (~resultsPerPage, ~totalResults, ~currentPage, ~paginate, ~btnCount=4 Disabled }} customButtonStyle="!h-10" - onClick={_evt => paginate(Math.Int.max(1, currentPage - 1))} + onClick={_ => paginate(Math.Int.max(1, currentPage - 1))} /> {pageNumbers ->Array.filter(nonEmpty) @@ -73,7 +73,7 @@ let make = (~resultsPerPage, ~totalResults, ~currentPage, ~paginate, ~btnCount=4 <Button key={idx->Int.toString} text={number->Int.toString} - onClick={_evt => paginate(number)} + onClick={_ => paginate(number)} buttonType customButtonStyle="!h-10 border-left-1 border-right-1" buttonState={if isSelected { @@ -87,7 +87,7 @@ let make = (~resultsPerPage, ~totalResults, ~currentPage, ~paginate, ~btnCount=4 <Button rightIcon buttonType - onClick={_evt => paginate(currentPage + 1)} + onClick={_ => paginate(currentPage + 1)} customButtonStyle="!h-10" buttonState={if currentPage < Array.length(pageNumbers) { Normal @@ -107,10 +107,10 @@ let make = (~resultsPerPage, ~totalResults, ~currentPage, ~paginate, ~btnCount=4 let selectInput: ReactFinalForm.fieldRenderPropsInput = { name: "dummy-name", onBlur: _ev => (), - onChange: _evt => { - let val = ranges->Array.get(_evt->formEventToInt - 1)->Option.getOr("1-10") + onChange: ev => { + let val = ranges->Array.get(ev->formEventToInt - 1)->Option.getOr("1-10") setDropDownVal(_ => val) - paginate(_evt->formEventToInt) + paginate(ev->formEventToInt) }, onFocus: _ev => (), value: ""->JSON.Encode.string, diff --git a/src/components/Paginator.res b/src/components/Paginator.res index c8dc4e10d..60dc50be4 100644 --- a/src/components/Paginator.res +++ b/src/components/Paginator.res @@ -45,13 +45,13 @@ let make = ( } let selectInput: ReactFinalForm.fieldRenderPropsInput = { name: "dummy-name", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { setResultsPerPage(_ => { ev->Identity.formReactEventToString->Int.fromString->Option.getOr(15) }) }, - onFocus: _ev => (), + onFocus: _ => (), value: resultsPerPage->Int.toString->JSON.Encode.string, checked: true, } diff --git a/src/components/ReactWindowTable.res b/src/components/ReactWindowTable.res index b6eb59b0a..93b7a46ba 100644 --- a/src/components/ReactWindowTable.res +++ b/src/components/ReactWindowTable.res @@ -78,7 +78,7 @@ module NewCell = { ) => { open Window - let onClick = React.useCallback(_ev => { + let onClick = React.useCallback(_ => { let isRangeSelected = getSelection().\"type" == "Range" switch (onRowClick, isRangeSelected) { | (Some(fn), false) => fn(rowIndex) @@ -90,14 +90,14 @@ module NewCell = { expandedIndexArr->Array.includes(rowIndex) }, [expandedIndexArr]) - let onMouseEnter = React.useCallback(_ev => { + let onMouseEnter = React.useCallback(_ => { switch onMouseEnter { | Some(fn) => fn(rowIndex) | _ => () } }, (onMouseEnter, rowIndex)) - let onMouseLeave = React.useCallback(_ev => { + let onMouseLeave = React.useCallback(_ => { switch onMouseLeave { | Some(fn) => fn(rowIndex) | _ => () @@ -400,7 +400,7 @@ module ReactWindowTableComponent = { hideFilter={showCheckBox && isFirstCol} removeVerticalLines tableDataBorderClass - isLast={i === len - 1 ? true : false} + isLast={i === len - 1} cellIndex=i cellWidth /> diff --git a/src/components/RippleEffectBackground.res b/src/components/RippleEffectBackground.res index e311a57f4..1732af6b8 100644 --- a/src/components/RippleEffectBackground.res +++ b/src/components/RippleEffectBackground.res @@ -20,7 +20,7 @@ external removeEventListener: (Dom.element, string, event => unit) => unit = "re let useLinearRippleHook = (ref: React.ref<Nullable.t<Dom.element>>, shouldRipple) => { React.useEffect(() => { - let handleMouseOver = _ev => { + let handleMouseOver = _ => { switch ref.current->Nullable.toOption { | Some(splash) => { let link = document->DOMUtils.createElement("div") @@ -62,7 +62,7 @@ let useLinearRippleHook = (ref: React.ref<Nullable.t<Dom.element>>, shouldRipple let useHorizontalRippleHook = (ref: React.ref<Nullable.t<Dom.element>>) => { React.useEffect(() => { - let handleMouseOver = _ev => { + let handleMouseOver = _ => { switch ref.current->Nullable.toOption { | Some(splash) => { let link = document->DOMUtils.createElement("div") diff --git a/src/components/SelectBox.res b/src/components/SelectBox.res index 975fe94c1..9df148bfa 100644 --- a/src/components/SelectBox.res +++ b/src/components/SelectBox.res @@ -540,7 +540,7 @@ module BaseSelect = { setSearchString(_ => str) } - let selectAll = select => _ev => { + let selectAll = select => _ => { let newValues = if select { let newVal = filteredOptions @@ -941,7 +941,7 @@ module BaseSelectButton = { let (itemdata, setItemData) = React.useState(() => "") let (assignButtonState, setAssignButtonState) = React.useState(_ => false) let searchRef = React.useRef(Nullable.null) - let onItemClick = itemData => _ev => { + let onItemClick = itemData => _ => { if !disableSelect { let isSelected = value->JSON.Decode.string->Option.mapOr(false, str => itemData === str) @@ -1273,7 +1273,7 @@ module BaseRadio = { setSearchString(_ => "") }, ) - let onItemClick = (itemData, isDisabled) => _ev => { + let onItemClick = (itemData, isDisabled) => _ => { if !isDisabled { let isSelected = value->JSON.Decode.string->Option.mapOr(false, str => itemData === str) @@ -1632,7 +1632,7 @@ module BaseDropdown = { } } - let removeOption = text => _ev => { + let removeOption = text => _ => { let actualValue = switch Array.find(transformedOptions, option => option.value == text) { | Some(str) => str.value | None => "" @@ -1702,8 +1702,8 @@ module BaseDropdown = { | TopLeft | TopRight => "mb-12" } - let onRadioOptionSelect = _ev => { - newInputRadio.onChange(_ev) + let onRadioOptionSelect = ev => { + newInputRadio.onChange(ev) addButton ? setShowDropDown(_ => true) : setShowDropDown(_ => false) } diff --git a/src/components/SelectModal.res b/src/components/SelectModal.res index e1d7cf236..3b0baae45 100644 --- a/src/components/SelectModal.res +++ b/src/components/SelectModal.res @@ -61,12 +61,12 @@ let make = ( let input: ReactFinalForm.fieldRenderPropsInput = { name: "cutomixedColumnsInput", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let target = ev->Identity.formReactEventToArrayOfString maxLengthArray(target, setValues) }, - onFocus: _ev => (), + onFocus: _ => (), value: values->LogicUtils.getJsonFromArrayOfString, checked: false, } diff --git a/src/components/SnackBarContainer.res b/src/components/SnackBarContainer.res index 46054136c..e2944f758 100644 --- a/src/components/SnackBarContainer.res +++ b/src/components/SnackBarContainer.res @@ -27,7 +27,7 @@ module Snackbar = { React.null } - let handleClick = React.useCallback(_ev => { + let handleClick = React.useCallback(_ => { switch snackbarProps.onClose { | Some(fn) => fn() | _ => () diff --git a/src/components/Table.res b/src/components/Table.res index 27714380e..391a4d1e0 100644 --- a/src/components/Table.res +++ b/src/components/Table.res @@ -88,7 +88,7 @@ module TableRow = { let (isCurrentRowExpanded, setIsCurrentRowExpanded) = React.useState(_ => false) let (expandedData, setExpandedData) = React.useState(_ => React.null) let actualIndex = offset + rowIndex - let onClick = React.useCallback(_ev => { + let onClick = React.useCallback(_ => { let isRangeSelected = getSelection().\"type" == "Range" switch (onRowClick, isRangeSelected) { | (Some(fn), false) => fn(actualIndex) @@ -96,21 +96,21 @@ module TableRow = { } }, (onRowClick, actualIndex)) - let onDoubleClick = React.useCallback(_ev => { + let onDoubleClick = React.useCallback(_ => { switch onRowDoubleClick { | Some(fn) => fn(actualIndex) | _ => () } }, (onRowDoubleClick, actualIndex)) - let onMouseEnter = React.useCallback(_ev => { + let onMouseEnter = React.useCallback(_ => { switch onMouseEnter { | Some(fn) => fn(actualIndex) | _ => () } }, (onMouseEnter, actualIndex)) - let onMouseLeave = React.useCallback(_ev => { + let onMouseLeave = React.useCallback(_ => { switch onMouseLeave { | Some(fn) => fn(actualIndex) | _ => () @@ -290,7 +290,7 @@ module SortAction = { | Some(obj: sortedObject) => obj.key === item.key ? obj.order : NONE | None => NONE } - let handleSortClick = _ev => { + let handleSortClick = _ => { switch setSortedObj { | Some(fn) => fn(_ => Some({ @@ -475,9 +475,9 @@ module TableHeadingCell = { if options->Array.length > 1 { let filterInput: ReactFinalForm.fieldRenderPropsInput = { name: "filterInput", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => handleUpdateFilterObj(ev, i), - onFocus: _ev => (), + onFocus: _ => (), value: selected->Array.map(JSON.Encode.string)->JSON.Encode.array, checked: true, } diff --git a/src/components/TableLocalFilters.res b/src/components/TableLocalFilters.res index 9badad237..103ff4cb4 100644 --- a/src/components/TableLocalFilters.res +++ b/src/components/TableLocalFilters.res @@ -102,9 +102,9 @@ module FilterDropDown = { let filterInput: ReactFinalForm.fieldRenderPropsInput = { name: val, - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => setLclFltrState(val, ev->formEventToJsonArr), - onFocus: _ev => (), + onFocus: _ => (), value: selectedValue->JSON.Encode.array, checked: true, } @@ -116,7 +116,7 @@ module FilterDropDown = { <div onClick={e => e->ReactEvent.Mouse.stopPropagation}> <span className={`flex items-center `} - onClick={_e => { + onClick={_ => { setLclFltrState(val, []) }}> <Icon className="align-middle" name="cross" /> @@ -184,7 +184,7 @@ module TextFilterCell = { let localInput = React.useMemo((): ReactFinalForm.fieldRenderPropsInput => { { name: "--", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let value = {ev->ReactEvent.Form.target}["value"] if value->String.includes("<script>") || value->String.includes("</script>") { @@ -199,7 +199,7 @@ module TextFilterCell = { setLclFltrState(val, [value->JSON.Encode.string]) }, - onFocus: _ev => (), + onFocus: _ => (), value: selectedValue, checked: false, } @@ -243,7 +243,7 @@ module RangeFilterCell = { let minSlide = React.useMemo((): ReactFinalForm.fieldRenderPropsInput => { { name: "--", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let value = {ev->ReactEvent.Form.target}["value"] @@ -254,7 +254,7 @@ module RangeFilterCell = { | None => () } }, - onFocus: _ev => (), + onFocus: _ => (), value: selectedValueStr[0]->Option.getOr(JSON.Encode.float(0.0)), checked: false, } @@ -263,7 +263,7 @@ module RangeFilterCell = { let maxSlide = React.useMemo((): ReactFinalForm.fieldRenderPropsInput => { { name: "--", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let value = {ev->ReactEvent.Form.target}["value"] @@ -273,7 +273,7 @@ module RangeFilterCell = { | None => () } }, - onFocus: _ev => (), + onFocus: _ => (), value: selectedValueStr[1]->Option.getOr(JSON.Encode.float(0.0)), checked: false, } diff --git a/src/components/TableUtils.res b/src/components/TableUtils.res index c67c4eff6..dd4899b04 100644 --- a/src/components/TableUtils.res +++ b/src/components/TableUtils.res @@ -440,11 +440,11 @@ module LinkCell = { | None => data } - let mouseOver = _ev => { + let mouseOver = _ => { setShowCopy(_ => true) } - let mouseOut = _ev => { + let mouseOut = _ => { setShowCopy(_ => false) } let visibility = showCopy && !isMobileView ? "visible" : "invisible" @@ -839,9 +839,9 @@ module HeaderActions = { let actionInput: ReactFinalForm.fieldRenderPropsInput = { name: "heading", - onBlur: _ev => (), + onBlur: _ => (), onChange, - onFocus: _ev => (), + onFocus: _ => (), value: order->getSortOrderToString->JSON.Encode.string, checked: true, } diff --git a/src/components/Tabs.res b/src/components/Tabs.res index d003b204d..34b5b888b 100644 --- a/src/components/Tabs.res +++ b/src/components/Tabs.res @@ -64,7 +64,7 @@ module TabInfo = { } else { `text-jp-gray-900 dark:text-jp-gray-text_darktheme dark:text-opacity-75 text-opacity-50 hover:text-opacity-75 dark:hover:text-opacity-100 ${borderDefaultStyle}` } - let handleClick = React.useCallback2(_ev => { + let handleClick = React.useCallback2(_ => { if isDisabled && disabledTab->Array.includes(title) { () } else { @@ -109,7 +109,7 @@ module IndicationArrow = { @react.component let make = (~iconName, ~side, ~refElement: React.ref<Js.nullable<Dom.element>>, ~isVisible) => { let onClick = { - _ev => + _ => refElement.current ->Nullable.toOption ->Option.forEach(input => @@ -186,7 +186,7 @@ let make = ( let scrollRef = React.useRef(Nullable.null) let lastTabRef = React.useRef(Nullable.null) let numberOfTabs = Array.length(tabs) - let onScroll = _ev => { + let onScroll = _ => { let leftVal = firstTabRef->getBoundingRectInfo(val => val.x) let rightVal = lastTabRef->getBoundingRectInfo(val => val.right) let scrollValLeft = scrollRef->getBoundingRectInfo(val => val.x) diff --git a/src/components/TabularInput.res b/src/components/TabularInput.res index 9ffa8cf56..af640eab3 100644 --- a/src/components/TabularInput.res +++ b/src/components/TabularInput.res @@ -19,12 +19,12 @@ module TableCell = { ->Array.mapWithIndex((itm, i) => { let input: ReactFinalForm.fieldRenderPropsInput = { name: `input`, - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let event = ev->ReactEvent.Form.target onChange(elemIndex, i, event["value"]) }, - onFocus: _ev => (), + onFocus: _ => (), value: (keyValue[elemIndex]->Option.getOr([]))[i]->Option.getOr("")->JSON.Encode.string, checked: true, } @@ -126,7 +126,7 @@ let make = (~input: ReactFinalForm.fieldRenderPropsInput, ~headings, ~fields) => setKeyValue(_ => a) } - let onClick = (elemIndex, isLast) => _ev => { + let onClick = (elemIndex, isLast) => _ => { let value = if isLast { Array.concat(initialState, dummyInitialState) } else { diff --git a/src/components/form/BoolInput.res b/src/components/form/BoolInput.res index 1b40f9acd..fc7a9f741 100644 --- a/src/components/form/BoolInput.res +++ b/src/components/form/BoolInput.res @@ -12,7 +12,7 @@ module BaseComponent = { ~boolCustomClass="", ~addAttributeId="", ) => { - let toggleSelect = React.useCallback(_ev => { + let toggleSelect = React.useCallback(_ => { if !isDisabled { setIsSelected(!isSelected) } diff --git a/src/components/form/FormRenderer.res b/src/components/form/FormRenderer.res index b025e4eef..840355f1f 100644 --- a/src/components/form/FormRenderer.res +++ b/src/components/form/FormRenderer.res @@ -614,7 +614,7 @@ module SubmitButton = { let (avoidDisable, setAvoidDisable) = React.useState(_ => userInteractionRequired) React.useEffect(() => { let onClick = { - _ev => { + _ => { setAvoidDisable(_ => false) } } @@ -676,7 +676,7 @@ module SubmitButton = { buttonType buttonState loadingText - onClick={_ev => { + onClick={_ => { form.submit()->ignore }} //either onclick or type_should be called #warning leftIcon=icon diff --git a/src/components/form/MultipleTextInput.res b/src/components/form/MultipleTextInput.res index dac1a45aa..1d3dd8e5f 100644 --- a/src/components/form/MultipleTextInput.res +++ b/src/components/form/MultipleTextInput.res @@ -113,7 +113,7 @@ let make = ( let input1: ReactFinalForm.fieldRenderPropsInput = { { name, - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let value = {ev->ReactEvent.Form.target}["value"] if value->String.includes("<script>") || value->String.includes("</script>") { @@ -127,7 +127,7 @@ let make = ( let val = value->String.replace("<script>", "")->String.replace("</script>", "") setText(_ => val) }, - onFocus: _ev => (), + onFocus: _ => (), value: JSON.Encode.string(text), checked: false, } diff --git a/src/components/modal/ModalContainer.res b/src/components/modal/ModalContainer.res index af01fd959..590740234 100644 --- a/src/components/modal/ModalContainer.res +++ b/src/components/modal/ModalContainer.res @@ -1,7 +1,7 @@ module ModalHeading = { @react.component let make = (~title, ~hideModal) => { - let handleClick = React.useCallback(_ev => { + let handleClick = React.useCallback(_ => { hideModal() }, [hideModal]) <div className="bg-purple-300 p-4 text-lg flex flex-row justify-between"> @@ -22,7 +22,7 @@ module Modal = { hideModalAtIndex(index) }, (hideModalAtIndex, index)) - let handleOutsideClick = React.useCallback(_ev => { + let handleOutsideClick = React.useCallback(_ => { if modalProps.closeOnClickOutside { hideModal() } diff --git a/src/components/priority-logics/AddPLGateway.res b/src/components/priority-logics/AddPLGateway.res index 80b9495c8..f44771b11 100644 --- a/src/components/priority-logics/AddPLGateway.res +++ b/src/components/priority-logics/AddPLGateway.res @@ -92,7 +92,7 @@ let make = ( let input: ReactFinalForm.fieldRenderPropsInput = { name: "gateways", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let newSelectedOptions = ev->Identity.formReactEventToArrayOfString if newSelectedOptions->Array.length === 0 { @@ -117,7 +117,7 @@ let make = ( gateWaysInput.onChange(gatewaysArr->Identity.anyTypeToReactEvent) } }, - onFocus: _ev => (), + onFocus: _ => (), value: selectedOptions ->Array.map(selectedOption => selectedOption.connector.merchant_connector_id->JSON.Encode.string diff --git a/src/components/tooltip/ToolTip.res b/src/components/tooltip/ToolTip.res index a16b700ee..8af938481 100644 --- a/src/components/tooltip/ToolTip.res +++ b/src/components/tooltip/ToolTip.res @@ -32,7 +32,7 @@ module TooltipMainWrapper = { let timeoutRef = React.useRef(None) - let handleMouseOver = _evt => { + let handleMouseOver = _ => { if !visibleOnClick { switch timeoutRef.current { | Some(timerId) => clearTimeout(timerId) @@ -42,7 +42,7 @@ module TooltipMainWrapper = { } } - let handleClick = _evt => { + let handleClick = _ => { if visibleOnClick { switch timeoutRef.current { | Some(timerId) => clearTimeout(timerId) @@ -52,7 +52,7 @@ module TooltipMainWrapper = { } } - let handleMouseOut = _evt => { + let handleMouseOut = _ => { if hoverOnToolTip { timeoutRef.current = setTimeout(() => { setIsToolTipVisible(_ => false) @@ -643,7 +643,7 @@ let make = ( React.useEffect(() => { if isToolTipVisible { - let handleScroll = (_e: Webapi.Dom.Event.t) => { + let handleScroll = _ => { setIsToolTipVisible(_ => false) } Window.addEventListener3("scroll", handleScroll, true) diff --git a/src/context/BetaEndPointConfigProvider.res b/src/context/BetaEndPointConfigProvider.res index a8fcebfa8..67b38b73b 100644 --- a/src/context/BetaEndPointConfigProvider.res +++ b/src/context/BetaEndPointConfigProvider.res @@ -1,4 +1,4 @@ -let defaultSetter = (_: option<AuthHooks.betaEndpoint>) => () +let defaultSetter = _ => () let defaultValue: option<AuthHooks.betaEndpoint> = None let betaEndPointConfig = React.createContext(defaultValue) diff --git a/src/context/ThemeProvider.res b/src/context/ThemeProvider.res index dbb7d0067..98a8b1fa8 100644 --- a/src/context/ThemeProvider.res +++ b/src/context/ThemeProvider.res @@ -1,6 +1,6 @@ type theme = Light | Dark -let defaultSetter = (_: theme) => () +let defaultSetter = _ => () type themeType = LightTheme @@ -29,7 +29,7 @@ let themeContext = { globalUIConfig: UIConfig.defaultUIConfig, theme: Light, themeSetter: defaultSetter, - configCustomDomainTheme: (_: JSON.t) => (), + configCustomDomainTheme: _ => (), } let themeContext = React.createContext(themeContext) diff --git a/src/context/TokenContextProvider.res b/src/context/TokenContextProvider.res index 9b26adf2d..a2a65900f 100644 --- a/src/context/TokenContextProvider.res +++ b/src/context/TokenContextProvider.res @@ -1,5 +1,5 @@ -let defaultTokenSetter = (_: option<string> => option<string>) => () -let defaultDictSetter = (_: Dict.t<JSON.t> => Dict.t<JSON.t>) => () +let defaultTokenSetter = _ => () +let defaultDictSetter = _ => () type tokenContextObjectType = { token: option<string>, diff --git a/src/context/UserTimeZoneProvider.res b/src/context/UserTimeZoneProvider.res index ec5392bdf..e3dc87196 100644 --- a/src/context/UserTimeZoneProvider.res +++ b/src/context/UserTimeZoneProvider.res @@ -1,5 +1,5 @@ open UserTimeZoneTypes -let defaultSetter = (_: timeZoneType) => () +let defaultSetter = _ => () let userTimeContext = React.createContext((IST, defaultSetter)) diff --git a/src/entryPoints/AuthModule/AuthModuleHooks.res b/src/entryPoints/AuthModule/AuthModuleHooks.res index 03fa6eac8..47752759f 100644 --- a/src/entryPoints/AuthModule/AuthModuleHooks.res +++ b/src/entryPoints/AuthModule/AuthModuleHooks.res @@ -52,7 +52,7 @@ let useAuthMethods = (): authMethodProps => { } setAuthMethods(_ => methods) } catch { - | Exn.Error(_e) => setAuthMethods(_ => AuthUtils.defaultListOfAuth) + | Exn.Error(_) => setAuthMethods(_ => AuthUtils.defaultListOfAuth) } }, []) diff --git a/src/entryPoints/AuthModule/TwoFaAuth/TwoFaElements.res b/src/entryPoints/AuthModule/TwoFaAuth/TwoFaElements.res index f3e3878f2..1f92782bd 100644 --- a/src/entryPoints/AuthModule/TwoFaAuth/TwoFaElements.res +++ b/src/entryPoints/AuthModule/TwoFaAuth/TwoFaElements.res @@ -88,12 +88,12 @@ module RecoveryCodesInput = { let make = (~recoveryCode, ~setRecoveryCode) => { let recoveryCodeInput: ReactFinalForm.fieldRenderPropsInput = { name: "recovery_code_input", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let value = ReactEvent.Form.target(ev)["value"] setRecoveryCode(_ => value) }, - onFocus: _ev => (), + onFocus: _ => (), value: recoveryCode->JSON.Encode.string, checked: true, } diff --git a/src/libraries/HeadlessUI.res b/src/libraries/HeadlessUI.res index 2aba40b8d..c2b455bdc 100644 --- a/src/libraries/HeadlessUI.res +++ b/src/libraries/HeadlessUI.res @@ -460,9 +460,9 @@ module SelectBoxHeadlessUI = { } <div className="text-left"> <Menu \"as"="div" className="relative inline-block text-left"> - {_menuProps => + {_ => <div> - <Menu.Button className> {_buttonProps => children} </Menu.Button> + <Menu.Button className> {_ => children} </Menu.Button> <Transition \"as"="span" enter="transition ease-out duration-100" @@ -473,7 +473,7 @@ module SelectBoxHeadlessUI = { leaveTo="transform opacity-0 scale-95"> <Menu.Items className={`absolute z-10 ${dropdownPositionClass} ${dropdownWidth} max-h-[225px] overflow-auto mt-2 p-1 origin-top-right bg-white dark:bg-jp-gray-950 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none`}> - {_props => + {_ => transformedOptions ->Array.mapWithIndex((option, index) => { let selected = switch value { diff --git a/src/libraries/ReactFinalForm.res b/src/libraries/ReactFinalForm.res index fb8e79794..e69b4889a 100644 --- a/src/libraries/ReactFinalForm.res +++ b/src/libraries/ReactFinalForm.res @@ -19,9 +19,9 @@ type fieldRenderPropsCustomInput<'t> = { let makeInputRecord = (val, setVal): fieldRenderPropsInput => { { name: "", - onBlur: _ev => (), + onBlur: _ => (), onChange: setVal, - onFocus: _ev => (), + onFocus: _ => (), value: val, checked: false, } @@ -236,9 +236,9 @@ external useFieldWithOptions: (string, useFieldOption) => fieldRenderProps = "us let makeFakeInput = ( ~value=JSON.Encode.null, - ~onChange=_ev => (), - ~onBlur=_ev => (), - ~onFocus=_ev => (), + ~onChange=_ => (), + ~onBlur=_ => (), + ~onFocus=_ => (), (), ) => { let input: fieldRenderPropsInput = { diff --git a/src/screens/Analytics/Analytics.res b/src/screens/Analytics/Analytics.res index 570ced986..5f5d337b1 100644 --- a/src/screens/Analytics/Analytics.res +++ b/src/screens/Analytics/Analytics.res @@ -5,16 +5,16 @@ open LogicUtils module BaseTableComponent = { @react.component let make = ( - ~filters as _: (string, string), + ~filters as _, ~tableData, ~defaultSort: string, ~tableDataLoading: bool, ~transactionTableDefaultCols, ~newDefaultCols: array<'colType>, ~newAllCols: array<'colType>, - ~colMapper as _: 'colType => string, + ~colMapper as _, ~tableEntity: EntityType.entityType<'colType, 't>, - ~tableGlobalFilter as _: option<(array<Nullable.t<'t>>, JSON.t) => array<Nullable.t<'t>>>, + ~tableGlobalFilter as _, ~activeTab as _, ) => { open DynamicTableUtils @@ -89,9 +89,7 @@ module TableWrapper = { ~tableEntity: EntityType.entityType<'colType, 't>, ~deltaMetrics: array<string>, ~deltaArray: array<string>, - ~tableUpdatedHeading as _: option< - (~item: option<'t>, ~dateObj: option<AnalyticsUtils.prevDates>) => 'colType => Table.header, - >, + ~tableUpdatedHeading as _, ~tableGlobalFilter: option<(array<Nullable.t<'t>>, JSON.t) => array<Nullable.t<'t>>>, ~moduleName, ~weeklyTableMetricsCols, diff --git a/src/screens/Analytics/AnalyticsNew.res b/src/screens/Analytics/AnalyticsNew.res index 3c5653930..65966fdc0 100644 --- a/src/screens/Analytics/AnalyticsNew.res +++ b/src/screens/Analytics/AnalyticsNew.res @@ -38,9 +38,7 @@ module TableWrapper = { ~tableEntity: EntityType.entityType<'colType, 't>, ~deltaMetrics: array<string>, ~deltaArray: array<string>, - ~tableUpdatedHeading as _: option< - (~item: option<'t>, ~dateObj: option<AnalyticsUtils.prevDates>, 'colType) => Table.header, - >, + ~tableUpdatedHeading as _, ~tableGlobalFilter: option<(array<Nullable.t<'t>>, JSON.t) => array<Nullable.t<'t>>>, ~moduleName, ~weeklyTableMetricsCols, diff --git a/src/screens/Analytics/AnalyticsUtils.res b/src/screens/Analytics/AnalyticsUtils.res index 88ae10876..0ffb13823 100644 --- a/src/screens/Analytics/AnalyticsUtils.res +++ b/src/screens/Analytics/AnalyticsUtils.res @@ -471,7 +471,7 @@ let generateTablePayload = ( ~mode: option<string>, ~customFilter, ~showDeltaMetrics=false, - ~moduleName as _: string, + ~moduleName as _, ~source: string="BATCH", (), ) => { diff --git a/src/screens/Analytics/DisputeAnalytics/DisputeAnalyticsEntity.res b/src/screens/Analytics/DisputeAnalytics/DisputeAnalyticsEntity.res index acd5eca57..a76b23b13 100644 --- a/src/screens/Analytics/DisputeAnalytics/DisputeAnalyticsEntity.res +++ b/src/screens/Analytics/DisputeAnalytics/DisputeAnalyticsEntity.res @@ -48,10 +48,7 @@ let tableItemToObjMapper: Dict.t<JSON.t> => disputeTableType = dict => { } } -let getUpdatedHeading = ( - ~item as _: option<disputeTableType>, - ~dateObj as _: option<AnalyticsUtils.prevDates>, -) => { +let getUpdatedHeading = (~item as _, ~dateObj as _) => { let getHeading = colType => { let key = colType->colMapper switch colType { diff --git a/src/screens/Analytics/HSAnalyticsUtils.res b/src/screens/Analytics/HSAnalyticsUtils.res index ede40e9e3..063bb29a2 100644 --- a/src/screens/Analytics/HSAnalyticsUtils.res +++ b/src/screens/Analytics/HSAnalyticsUtils.res @@ -203,7 +203,7 @@ let generateTablePayload = ( ~mode: option<string>, ~customFilter, ~showDeltaMetrics, - ~moduleName as _: string, + ~moduleName as _, ~source: string="BATCH", (), ) => { diff --git a/src/screens/Analytics/PaymentsAnalytics/PaymentAnalyticsEntity.res b/src/screens/Analytics/PaymentsAnalytics/PaymentAnalyticsEntity.res index 18efc9a4f..e5a497947 100644 --- a/src/screens/Analytics/PaymentsAnalytics/PaymentAnalyticsEntity.res +++ b/src/screens/Analytics/PaymentsAnalytics/PaymentAnalyticsEntity.res @@ -108,10 +108,7 @@ let tableItemToObjMapper: Dict.t<JSON.t> => paymentTableType = dict => { } } -let getUpdatedHeading = ( - ~item as _: option<paymentTableType>, - ~dateObj as _: option<AnalyticsUtils.prevDates>, -) => { +let getUpdatedHeading = (~item as _, ~dateObj as _) => { let getHeading = colType => { let key = colType->colMapper switch colType { diff --git a/src/screens/Analytics/RefundsAnalytics/RefundsAnalyticsEntity.res b/src/screens/Analytics/RefundsAnalytics/RefundsAnalyticsEntity.res index 8cd1ef7ab..39014b618 100644 --- a/src/screens/Analytics/RefundsAnalytics/RefundsAnalyticsEntity.res +++ b/src/screens/Analytics/RefundsAnalytics/RefundsAnalyticsEntity.res @@ -32,10 +32,7 @@ let tableItemToObjMapper: 'a => refundTableType = dict => { } } -let getUpdatedHeading = ( - ~item as _: option<refundTableType>, - ~dateObj as _: option<AnalyticsUtils.prevDates>, -) => { +let getUpdatedHeading = (~item as _, ~dateObj as _) => { let getHeading = colType => { let key = colType->colMapper switch colType { diff --git a/src/screens/ConfigurePMTs/PaymentMethodConfig.res b/src/screens/ConfigurePMTs/PaymentMethodConfig.res index 09bcd525e..492ec931b 100644 --- a/src/screens/ConfigurePMTs/PaymentMethodConfig.res +++ b/src/screens/ConfigurePMTs/PaymentMethodConfig.res @@ -10,7 +10,7 @@ module PmtConfigInp = { let input: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let value = ev->Identity.formReactEventToArrayOfString if value->Array.length <= 0 { @@ -25,7 +25,7 @@ module PmtConfigInp = { enableType.onChange("enable_only"->Identity.anyTypeToReactEvent) } }, - onFocus: _ev => (), + onFocus: _ => (), value: enabledList.value, checked: true, } diff --git a/src/screens/Connectors/ConnectPayPalFlow/ConnectPayPal.res b/src/screens/Connectors/ConnectPayPalFlow/ConnectPayPal.res index 0eaf6b990..c7791c4c8 100644 --- a/src/screens/Connectors/ConnectPayPalFlow/ConnectPayPal.res +++ b/src/screens/Connectors/ConnectPayPalFlow/ConnectPayPal.res @@ -471,7 +471,7 @@ let make = ( connector={connector->ConnectorUtils.getConnectorNameTypeFromString} selectedConnector isLabelNested=false - disabled={isUpdateFlow ? true : false} + disabled={isUpdateFlow} description="This is an unique label you can generate and pass in order to identify this connector account on your Hyperswitch dashboard and reports. Eg: if your profile label is 'default', connector label can be 'stripe_default'" /> </div> diff --git a/src/screens/Connectors/ConnectPayPalFlow/MenuOptionForPayPal.res b/src/screens/Connectors/ConnectPayPalFlow/MenuOptionForPayPal.res index 4fc928b5e..473d29933 100644 --- a/src/screens/Connectors/ConnectPayPalFlow/MenuOptionForPayPal.res +++ b/src/screens/Connectors/ConnectPayPalFlow/MenuOptionForPayPal.res @@ -88,7 +88,7 @@ let make = ( <Popover \"as"="div" className="relative inline-block text-left"> {_popoverProps => <> - <Popover.Button> {_buttonProps => <Icon name="menu-option" size=28 />} </Popover.Button> + <Popover.Button> {_ => <Icon name="menu-option" size=28 />} </Popover.Button> <Popover.Panel className="absolute z-20 right-0 top-10"> {panelProps => { <div diff --git a/src/screens/Connectors/ConnectorAccountDetailsHelper.res b/src/screens/Connectors/ConnectorAccountDetailsHelper.res index 22b83c508..a1da0d72b 100644 --- a/src/screens/Connectors/ConnectorAccountDetailsHelper.res +++ b/src/screens/Connectors/ConnectorAccountDetailsHelper.res @@ -13,13 +13,13 @@ module MultiConfigInp = { let input: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let value = ev->Identity.formReactEventToArrayOfString valueField.onChange(value->Identity.anyTypeToReactEvent) enabledList.onChange(value->Identity.anyTypeToReactEvent) }, - onFocus: _ev => (), + onFocus: _ => (), value: enabledList.value, checked: true, } @@ -210,7 +210,7 @@ module CashToCodeSelectBox = { {opts ->Array.mapWithIndex((country, index) => { <div key={index->Int.toString} className="flex items-center gap-2 break-words p-2"> - <div onClick={_e => selectedCountry(country)}> + <div onClick={_ => selectedCountry(country)}> <CheckBoxIcon isSelected={country->isSelected} /> </div> <p className=p2RegularTextStyle> {React.string(country->snakeToTitle)} </p> diff --git a/src/screens/Connectors/ConnectorAdditionalMerchantData/PlaidAdditionalMerchantData.res b/src/screens/Connectors/ConnectorAdditionalMerchantData/PlaidAdditionalMerchantData.res index 99492e649..573bac41e 100644 --- a/src/screens/Connectors/ConnectorAdditionalMerchantData/PlaidAdditionalMerchantData.res +++ b/src/screens/Connectors/ConnectorAdditionalMerchantData/PlaidAdditionalMerchantData.res @@ -78,7 +78,7 @@ let make = (~connectorAdditionalMerchantData) => { let keys = connectorAdditionalMerchantData->Dict.keysToArray - let updateOpenBanking = (_evt: ReactEvent.Form.t) => { + let updateOpenBanking = _ => { form.change( "additional_merchant_data.open_banking_recipient_data", JSON.Encode.null->Identity.genericTypeToJson, @@ -86,7 +86,7 @@ let make = (~connectorAdditionalMerchantData) => { setaccountData(_ => "") } - let updateAccountData = (_evt: ReactEvent.Form.t) => { + let updateAccountData = _ => { form.change( "additional_merchant_data.open_banking_recipient_data.account_data", JSON.Encode.null->Identity.genericTypeToJson, diff --git a/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePayIntegration.res b/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePayIntegration.res index 32b6f0735..36cbe8e8b 100644 --- a/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePayIntegration.res +++ b/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePayIntegration.res @@ -50,7 +50,7 @@ module Verified = { <div key={Int.toString(index)} className="mt-4 cursor-pointer" - onClick={_e => setApplePayIntegrationType(_ => #manual)}> + onClick={_ => setApplePayIntegrationType(_ => #manual)}> <div className={`relative w-full p-6 rounded flex flex-col justify-between border `}> <div className="flex justify-between"> <div className={`font-medium text-base text-hyperswitch_black `}> @@ -67,7 +67,7 @@ module Verified = { /> | #manual => <Icon - onClick={_ev => setApplePayIntegrationSteps(_ => Configure)} + onClick={_ => setApplePayIntegrationSteps(_ => Configure)} name={"arrow-right"} size={15} /> @@ -82,12 +82,12 @@ module Verified = { <Button text="Reconfigure" buttonType={Secondary} - onClick={_ev => { + onClick={_ => { setApplePayIntegrationSteps(_ => Landing) }} /> <Button - onClick={_ev => { + onClick={_ => { onSubmit() }} text="Proceed" @@ -117,7 +117,7 @@ module Landing = { | Processors(CYBERSOURCE) => <div className="p-6 m-2 cursor-pointer" - onClick={_e => setApplePayIntegrationType(_ => #simplified)}> + onClick={_ => setApplePayIntegrationType(_ => #simplified)}> <Card heading="Web Domain" isSelected={appleIntegrationType === #simplified}> <div className={` mt-2 text-base text-hyperswitch_black opacity-50 font-normal`}> {"Get Apple Pay enabled on your web domains by hosting a verification file, that’s it."->React.string} @@ -133,7 +133,7 @@ module Landing = { | _ => React.null }} <div - className="p-6 m-2 cursor-pointer" onClick={_e => setApplePayIntegrationType(_ => #manual)}> + className="p-6 m-2 cursor-pointer" onClick={_ => setApplePayIntegrationType(_ => #manual)}> <Card heading="iOS Certificate" isSelected={appleIntegrationType === #manual}> <div className={` mt-2 text-base text-hyperswitch_black opacity-50 font-normal`}> <CustomSubText /> @@ -150,12 +150,12 @@ module Landing = { <Button text="Cancel" buttonType={Secondary} - onClick={_ev => { + onClick={_ => { closeModal() }} /> <Button - onClick={_ev => setApplePayIntegrationSteps(_ => Configure)} + onClick={_ => setApplePayIntegrationSteps(_ => Configure)} text="Continue" buttonType={Primary} /> diff --git a/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePayManualFlow.res b/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePayManualFlow.res index b6b16f319..7bcad76b2 100644 --- a/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePayManualFlow.res +++ b/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePayManualFlow.res @@ -272,14 +272,14 @@ let make = ( <Button text="Go Back" buttonType={Secondary} - onClick={_ev => { + onClick={_ => { setApplePayIntegrationSteps(_ => Landing) }} /> <Button text="Verify & Enable" buttonType={Primary} - onClick={_ev => { + onClick={_ => { onSubmit()->ignore }} buttonState={formState.values->validateManualFlow} diff --git a/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePaySimplifiedFlow.res b/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePaySimplifiedFlow.res index e282da87d..1981c9ab5 100644 --- a/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePaySimplifiedFlow.res +++ b/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePaySimplifiedFlow.res @@ -176,14 +176,14 @@ let make = ( <Button text="Go Back" buttonType={Secondary} - onClick={_ev => { + onClick={_ => { setApplePayIntegrationSteps(_ => Landing) }} /> <Button text="Verify & Enable" buttonType={Primary} - onClick={_ev => { + onClick={_ => { onSubmit()->ignore }} buttonState={formState.values->validateSimplifedFlow} diff --git a/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePayZen.res b/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePayZen.res index 51a254b1e..952f2c368 100644 --- a/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePayZen.res +++ b/src/screens/Connectors/ConnectorMetaData/ApplePay/ApplePayZen.res @@ -49,7 +49,7 @@ let make = (~applePayFields, ~update, ~closeModal, ~setShowWalletConfigurationMo <Button text="Go Back" buttonType={Secondary} - onClick={_ev => { + onClick={_ => { // setShowWalletConfigurationModal(_ => false) closeModal() }} @@ -57,7 +57,7 @@ let make = (~applePayFields, ~update, ~closeModal, ~setShowWalletConfigurationMo <Button text="Verify & Enable" buttonType={Primary} - onClick={_ev => { + onClick={_ => { onSubmit()->ignore }} buttonState={formState.values->validateZenFlow} diff --git a/src/screens/Connectors/ConnectorMetaData/BankDebit/BankDebit.res b/src/screens/Connectors/ConnectorMetaData/BankDebit/BankDebit.res index c9cb3f4b0..618a42b0d 100644 --- a/src/screens/Connectors/ConnectorMetaData/BankDebit/BankDebit.res +++ b/src/screens/Connectors/ConnectorMetaData/BankDebit/BankDebit.res @@ -160,9 +160,9 @@ let make = ( labelTextStyleClass="pt-2 pb-2 text-fs-13 text-jp-gray-900 dark:text-jp-gray-text_darktheme dark:text-opacity-50 ml-1 font-semibold" /> <div className={`flex gap-2 justify-end mt-4`}> - <Button text="Cancel" buttonType={Secondary} onClick={_ev => closeModal()} /> + <Button text="Cancel" buttonType={Secondary} onClick={_ => closeModal()} /> <Button - onClick={_ev => { + onClick={_ => { onSubmit()->ignore }} text="Proceed" diff --git a/src/screens/Connectors/ConnectorMetaData/GooglePay/GooglePayIntegration.res b/src/screens/Connectors/ConnectorMetaData/GooglePay/GooglePayIntegration.res index 35286cf8d..087514f38 100644 --- a/src/screens/Connectors/ConnectorMetaData/GooglePay/GooglePayIntegration.res +++ b/src/screens/Connectors/ConnectorMetaData/GooglePay/GooglePayIntegration.res @@ -68,12 +68,12 @@ let make = (~connector, ~setShowWalletConfigurationModal, ~update, ~onCloseClick <Button text="Cancel" buttonType={Secondary} - onClick={_ev => { + onClick={_ => { closeModal()->ignore }} /> <Button - onClick={_ev => { + onClick={_ => { onSubmit()->ignore }} text="Proceed" diff --git a/src/screens/Connectors/ConnectorPreview.res b/src/screens/Connectors/ConnectorPreview.res index 2e2a2141e..4bcfb8d18 100644 --- a/src/screens/Connectors/ConnectorPreview.res +++ b/src/screens/Connectors/ConnectorPreview.res @@ -63,7 +63,7 @@ module DeleteConnectorMenu = { } <AddDataAttributes attributes=[("data-testid", "delete-button"->String.toLowerCase)]> <div> - <Button text="Delete" onClick={_e => openConfirmationPopUp()} /> + <Button text="Delete" onClick={_ => openConfirmationPopUp()} /> </div> </AddDataAttributes> } @@ -101,7 +101,7 @@ module MenuOption = { <Popover \"as"="div" className="relative inline-block text-left"> {_popoverProps => <> - <Popover.Button> {_buttonProps => <Icon name="menu-option" size=28 />} </Popover.Button> + <Popover.Button> {_ => <Icon name="menu-option" size=28 />} </Popover.Button> <Popover.Panel className="absolute z-20 right-5 top-4"> {panelProps => { <div diff --git a/src/screens/FraudAndRisk/FRMIntegrationFields.res b/src/screens/FraudAndRisk/FRMIntegrationFields.res index c1d8bd3eb..ad99e3c3a 100644 --- a/src/screens/FraudAndRisk/FRMIntegrationFields.res +++ b/src/screens/FraudAndRisk/FRMIntegrationFields.res @@ -6,12 +6,12 @@ module AdvanceSettings = { let inputLabel: ReactFinalForm.fieldRenderPropsInput = { name: `input`, - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let value = ev->Identity.formReactEventToBool setIsFRMSettings(_ => value) }, - onFocus: _ev => (), + onFocus: _ => (), value: {isFRMSettings->JSON.Encode.bool}, checked: true, } diff --git a/src/screens/HSwitchRemoteFilter.res b/src/screens/HSwitchRemoteFilter.res index 9410a895b..066dc1fef 100644 --- a/src/screens/HSwitchRemoteFilter.res +++ b/src/screens/HSwitchRemoteFilter.res @@ -92,9 +92,9 @@ module SearchBarFilter = { let inputSearch: ReactFinalForm.fieldRenderPropsInput = { name: "name", - onBlur: _ev => (), + onBlur: _ => (), onChange, - onFocus: _ev => (), + onFocus: _ => (), value: baseValue->JSON.Encode.string, checked: true, } diff --git a/src/screens/Helpers/TableSearchFilter.res b/src/screens/Helpers/TableSearchFilter.res index f977d9eac..23dc6148d 100644 --- a/src/screens/Helpers/TableSearchFilter.res +++ b/src/screens/Helpers/TableSearchFilter.res @@ -24,9 +24,9 @@ let make = ( let inputSearch: ReactFinalForm.fieldRenderPropsInput = { name: "search", - onBlur: _ev => (), + onBlur: _ => (), onChange, - onFocus: _ev => (), + onFocus: _ => (), value: searchVal->JSON.Encode.string, checked: true, } diff --git a/src/screens/NewAnalytics/NewAnalyticsHelper.res b/src/screens/NewAnalytics/NewAnalyticsHelper.res index 5ab7bb840..c16d52468 100644 --- a/src/screens/NewAnalytics/NewAnalyticsHelper.res +++ b/src/screens/NewAnalytics/NewAnalyticsHelper.res @@ -57,11 +57,11 @@ module CustomDropDown = { open HeadlessUI let (arrow, setArrow) = React.useState(_ => false) <Menu \"as"="div" className="relative inline-block text-left"> - {_menuProps => + {_ => <div> <Menu.Button className="inline-flex whitespace-pre leading-5 justify-center text-sm px-4 py-2 font-medium rounded-lg hover:bg-opacity-80 bg-white border border-outline"> - {_buttonProps => { + {_ => { <> {buttonText->React.string} <Icon diff --git a/src/screens/PMAuthenticationProcessor/PMAuthenticationHome.res b/src/screens/PMAuthenticationProcessor/PMAuthenticationHome.res index f2f7e4798..ff82f51e5 100644 --- a/src/screens/PMAuthenticationProcessor/PMAuthenticationHome.res +++ b/src/screens/PMAuthenticationProcessor/PMAuthenticationHome.res @@ -22,7 +22,7 @@ module MenuOption = { <Popover \"as"="div" className="relative inline-block text-left"> {_popoverProps => <> - <Popover.Button> {_buttonProps => <Icon name="menu-option" size=28 />} </Popover.Button> + <Popover.Button> {_ => <Icon name="menu-option" size=28 />} </Popover.Button> <Popover.Panel className="absolute z-20 right-5 top-4"> {panelProps => { <div diff --git a/src/screens/Recon/ReconModule.res b/src/screens/Recon/ReconModule.res index e04ac7a20..6c963e345 100644 --- a/src/screens/Recon/ReconModule.res +++ b/src/screens/Recon/ReconModule.res @@ -57,7 +57,7 @@ let make = (~urlList) => { {if redirectToken->isNonEmptyString { <div className="h-85-vh overflow-scroll"> <iframe - onLoad={_ev => { + onLoad={_ => { setIframeLoaded(_ => true) }} id="recon-module" diff --git a/src/screens/Routing/RoutingUtils.res b/src/screens/Routing/RoutingUtils.res index bf5bd3ad6..2291fa47b 100644 --- a/src/screens/Routing/RoutingUtils.res +++ b/src/screens/Routing/RoutingUtils.res @@ -170,7 +170,7 @@ module SaveAndActivateButton = { ReactFinalForm.useFormSubscription(["values"])->Nullable.make, ) - let handleSaveAndActivate = async _ev => { + let handleSaveAndActivate = async _ => { try { let onSubmitResponse = await onSubmit(formState.values, false) let currentActivatedFromJson = onSubmitResponse->getValFromNullableValue(JSON.Encode.null) diff --git a/src/screens/RoutingRevamp/AddRuleGateway.res b/src/screens/RoutingRevamp/AddRuleGateway.res index 3e5c5bccc..9bd629dea 100644 --- a/src/screens/RoutingRevamp/AddRuleGateway.res +++ b/src/screens/RoutingRevamp/AddRuleGateway.res @@ -39,7 +39,7 @@ let make = (~id, ~gatewayOptions, ~isFirst=false, ~isExpanded) => { let input: ReactFinalForm.fieldRenderPropsInput = { name: "gateways", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let newSelectedOptions = ev->Identity.formReactEventToArrayOfString @@ -72,7 +72,7 @@ let make = (~id, ~gatewayOptions, ~isFirst=false, ~isExpanded) => { gateWaysInput.onChange(gatewaysArr->Identity.anyTypeToReactEvent) } }, - onFocus: _ev => (), + onFocus: _ => (), value: selectedOptions ->Array.map(option => AdvancedRoutingUtils.getConnectorStringFromConnectorSelectionData( diff --git a/src/screens/RoutingRevamp/AdvancedRoutingUIUtils.res b/src/screens/RoutingRevamp/AdvancedRoutingUIUtils.res index 3f09d4b5c..60a807e70 100644 --- a/src/screens/RoutingRevamp/AdvancedRoutingUIUtils.res +++ b/src/screens/RoutingRevamp/AdvancedRoutingUIUtils.res @@ -39,7 +39,7 @@ module OperatorInp = { @react.component let make = (~fieldsArray: array<ReactFinalForm.fieldRenderProps>, ~keyType) => { let defaultInput: ReactFinalForm.fieldRenderProps = { - input: ReactFinalForm.makeInputRecord(""->JSON.Encode.string, _e => ()), + input: ReactFinalForm.makeInputRecord(""->JSON.Encode.string, _ => ()), meta: ReactFinalForm.makeCustomError(None), } let field = (fieldsArray->Array.get(0)->Option.getOr(defaultInput)).input @@ -49,12 +49,12 @@ module OperatorInp = { let input: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let value = ev->Identity.formReactEventToString operator.onChange(value->Identity.anyTypeToReactEvent) }, - onFocus: _ev => (), + onFocus: _ => (), value: operator.value, checked: true, } @@ -135,12 +135,12 @@ module ValueInp = { let input: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let value = ev->Identity.formReactEventToArrayOfString valueField.onChange(value->Identity.anyTypeToReactEvent) }, - onFocus: _ev => (), + onFocus: _ => (), value: valueField.value, checked: true, } @@ -187,7 +187,7 @@ module MetadataInp = { let textInput: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => { + onBlur: _ => { let value = valueField.value let val = value->LogicUtils.getStringFromJson("") let valSplit = String.split(val, ",") @@ -203,7 +203,7 @@ module MetadataInp = { let value = target["value"] valueField.onChange(value->Identity.anyTypeToReactEvent) }, - onFocus: _ev => (), + onFocus: _ => (), value: valueField.value, checked: true, } @@ -313,7 +313,7 @@ module FieldInp = { let input: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let value = ev->Identity.formReactEventToString onChangeMethod(value) @@ -321,7 +321,7 @@ module FieldInp = { op.onChange(""->Identity.anyTypeToReactEvent) val.onChange(""->Identity.anyTypeToReactEvent) }, - onFocus: _ev => (), + onFocus: _ => (), value: field.value, checked: true, } @@ -524,7 +524,7 @@ module SaveAndActivateButton = { ReactFinalForm.useFormSubscription(["values"])->Nullable.make, ) - let handleSaveAndActivate = async _ev => { + let handleSaveAndActivate = async _ => { try { let onSubmitResponse = await onSubmit(formState.values, false) let currentActivatedFromJson = diff --git a/src/screens/SDKPayment/WebSDK.res b/src/screens/SDKPayment/WebSDK.res index 9afa6c2c3..7cfcf8c71 100644 --- a/src/screens/SDKPayment/WebSDK.res +++ b/src/screens/SDKPayment/WebSDK.res @@ -66,7 +66,7 @@ module CheckoutForm = { ->then(json => { json->resolve }) - ->catch(_e => { + ->catch(_ => { Dict.make()->JSON.Encode.object->resolve }) ->ignore diff --git a/src/screens/SbxOnboardingSurvey/SbxOnboardingSurvey.res b/src/screens/SbxOnboardingSurvey/SbxOnboardingSurvey.res index 813feb17d..2618c019d 100644 --- a/src/screens/SbxOnboardingSurvey/SbxOnboardingSurvey.res +++ b/src/screens/SbxOnboardingSurvey/SbxOnboardingSurvey.res @@ -7,7 +7,7 @@ module OtherfieldRender = { let textInput: ReactFinalForm.fieldRenderPropsInput = { name: `${field_name}_otherstring`, - onBlur: _ev => { + onBlur: _ => { let textFieldValue = textField.value->getStringFromJson("") let valueFieldValue = valueField.value->getArrayFromJson([])->getStrArrayFromJsonArray if textFieldValue->isNonEmptyString { @@ -20,7 +20,7 @@ module OtherfieldRender = { let value = target["value"] textField.onChange(value->Identity.anyTypeToReactEvent) }, - onFocus: _ev => (), + onFocus: _ => (), value: textField.value, checked: false, } diff --git a/src/screens/Sidebar/Sidebar.res b/src/screens/Sidebar/Sidebar.res index 90d78dc27..38791026b 100644 --- a/src/screens/Sidebar/Sidebar.res +++ b/src/screens/Sidebar/Sidebar.res @@ -620,7 +620,7 @@ let make = ( } `${openClasses} border-none` }> - {_buttonProps => <> + {_ => <> <div className="flex items-center"> <div className="inline-block text-offset_white bg-profile-sidebar-blue text-center w-10 h-10 leading-10 rounded-full mr-4"> diff --git a/src/screens/SwitchMerchant/SwitchMerchant.res b/src/screens/SwitchMerchant/SwitchMerchant.res index 0bc913093..ed5f10f62 100644 --- a/src/screens/SwitchMerchant/SwitchMerchant.res +++ b/src/screens/SwitchMerchant/SwitchMerchant.res @@ -159,11 +159,11 @@ module ExternalUser = { open HeadlessUI <> <Menu \"as"="div" className="relative inline-block text-left"> - {_menuProps => + {_ => <div> <Menu.Button className="inline-flex whitespace-pre leading-5 justify-center text-sm px-4 py-2 font-medium rounded-md hover:bg-opacity-80 bg-white border"> - {_buttonProps => { + {_ => { <> {selectedMerchantObject.merchant_name->React.string} <Icon diff --git a/src/screens/ThreeDsProcessors/ThreeDsProcessorHome.res b/src/screens/ThreeDsProcessors/ThreeDsProcessorHome.res index 28b4fc603..3a1c1dd58 100644 --- a/src/screens/ThreeDsProcessors/ThreeDsProcessorHome.res +++ b/src/screens/ThreeDsProcessors/ThreeDsProcessorHome.res @@ -4,7 +4,7 @@ module MenuOption = { let make = (~updateStepValue, ~setCurrentStep) => { <Popover \"as"="div" className="relative inline-block text-left"> {_popoverProps => <> - <Popover.Button> {_buttonProps => <Icon name="menu-option" size=28 />} </Popover.Button> + <Popover.Button> {_ => <Icon name="menu-option" size=28 />} </Popover.Button> <Popover.Panel className="absolute z-20 right-5 top-4"> {panelProps => { <div diff --git a/src/screens/UserManagement/OldUserManagement/ShowUserData.res b/src/screens/UserManagement/OldUserManagement/ShowUserData.res index b42f9a5e3..de553bd71 100644 --- a/src/screens/UserManagement/OldUserManagement/ShowUserData.res +++ b/src/screens/UserManagement/OldUserManagement/ShowUserData.res @@ -41,7 +41,7 @@ module UserUtilsPopover = { } `${openClasses} border-none` }> - {_buttonProps => <Icon name="menu-option" size=28 />} + {_ => <Icon name="menu-option" size=28 />} </Popover.Button> <Transition \"as"="span" diff --git a/src/screens/UserManagement/UserRevamp/ManageUserModal.res b/src/screens/UserManagement/UserRevamp/ManageUserModal.res index 745658313..363950760 100644 --- a/src/screens/UserManagement/UserRevamp/ManageUserModal.res +++ b/src/screens/UserManagement/UserRevamp/ManageUserModal.res @@ -22,12 +22,12 @@ module ChangeRoleSection = { let input: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: ev => { let value = ev->Identity.formReactEventToString setUserRole(_ => value) }, - onFocus: _ev => (), + onFocus: _ => (), value: userRole->JSON.Encode.string, checked: true, } diff --git a/src/utils/BreadCrumbNavigation.res b/src/utils/BreadCrumbNavigation.res index f8e954e0b..ead710c0d 100644 --- a/src/utils/BreadCrumbNavigation.res +++ b/src/utils/BreadCrumbNavigation.res @@ -41,7 +41,7 @@ let make = ( let onClick = switch crumb.onClick { | Some(fn) => fn | None => - _ev => + _ => showPopUp({ popUpType: (Warning, WithIcon), heading: "Heads up!", diff --git a/src/utils/Modal.res b/src/utils/Modal.res index 8906c393c..adfd18e57 100644 --- a/src/utils/Modal.res +++ b/src/utils/Modal.res @@ -231,11 +231,11 @@ let make = ( let headerTextClass = headerTextClass->getHeaderTextClass - let onCloseClick = _evt => { + let onCloseClick = _ => { setShowModal(prev => !prev) onCloseClickCustomFun() } - let onBackClick = _evt => onBackClick() + let onBackClick = _ => onBackClick() let handleOverlayClick = ev => { if closeOnOutsideClick {