From d047ae7905b3df6fc19679519ed29ad17c164e29 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja <1805317@kiit.ac.in> Date: Wed, 24 Jan 2024 18:59:35 +0530 Subject: [PATCH] chore: remove redundant code (#298) --- src/components/AuthWrapperUtils.res | 5 - src/components/DynamicTableUtils.res | 7 +- src/components/RemoteFilter.res | 7 +- src/components/SelectBox.res | 7 +- src/components/SelectBox.resi | 139 ++++++++++++++---- src/components/form/FormValuesSpy.res | 4 +- src/context/ThemeProvider.res | 5 +- .../analytics/EulerAnalyticsLogUtils.res | 2 - src/genericUtils/DOMUtils.res | 2 - src/hooks/AuthHooks.res | 3 - src/libraries/Clipboard.res | 5 +- src/libraries/Window.res | 6 + .../HyperSwitch/Analytics/Analytics.res | 3 - .../Analytics/HSAnalyticsUtils.res | 2 - src/screens/HyperSwitch/SDKPayment/WebSDK.res | 3 - .../HyperSwitch/Utils/HSSelfServeSidebar.res | 3 - 16 files changed, 130 insertions(+), 73 deletions(-) diff --git a/src/components/AuthWrapperUtils.res b/src/components/AuthWrapperUtils.res index 7143a03b4..7367343ab 100644 --- a/src/components/AuthWrapperUtils.res +++ b/src/components/AuthWrapperUtils.res @@ -1,8 +1,3 @@ -type parent - -@val external window: 'a = "window" -@val @scope("window") external parent: parent = "parent" - let getValidToken = oStr => { if oStr !== Some("__failed") && oStr !== Some("") { oStr diff --git a/src/components/DynamicTableUtils.res b/src/components/DynamicTableUtils.res index 0ed26a256..2bfaf6e7b 100644 --- a/src/components/DynamicTableUtils.res +++ b/src/components/DynamicTableUtils.res @@ -1,7 +1,5 @@ let tableHeadingClass = "font-bold text-xl text-black text-opacity-75 dark:text-white dark:text-opacity-75" type view = Table | Card -@val @scope(("window", "location")) -external reload: unit => unit = "reload" let visibilityColFunc = ( ~dateFormatConvertor: string => option, @@ -248,7 +246,10 @@ module TableLoadingErrorIndicator = { {React.string("Oops, Something Went Wrong! Try again Later.")}