diff --git a/src/components/CardTable.res b/src/components/CardTable.res index 5fa972f3b..9b8e7b919 100644 --- a/src/components/CardTable.res +++ b/src/components/CardTable.res @@ -1,9 +1,11 @@ module TextCard = { @react.component let make = (~text) => { - if String.length(String.trim(text)) > 0 { + if text->LogicUtils.isNonEmptyString {

- {React.string(String.length(String.trim(text)) > 0 ? text : "N/A")} + LogicUtils.isNonEmptyString ? text : "N/A"} showCopy=false + />

} else { React.string("-") diff --git a/src/components/LoadedTable.res b/src/components/LoadedTable.res index 7a0069caf..05979bab0 100644 --- a/src/components/LoadedTable.res +++ b/src/components/LoadedTable.res @@ -896,15 +896,13 @@ let make = ( }} - - {switch tableActions { - | Some(actions) => - LoadedTableContext.toInfoData}> -
actions
-
- | None => React.null - }} -
+ {switch tableActions { + | Some(actions) => + LoadedTableContext.toInfoData}> +
actions
+
+ | None => React.null + }} let addDataAttributesClass = if isHighchartLegend { @@ -988,10 +986,10 @@ let make = ( : tableDataBackgroundClass}`}> paginationUI { - let topBottomActions = if bottomActions->Option.isSome || !isMobileView { + let topBottomActions = if bottomActions->Option.isSome{ bottomActions } else { - tableActions + None } switch topBottomActions { diff --git a/src/screens/Developer/APIKeys/KeyManagement.res b/src/screens/Developer/APIKeys/KeyManagement.res index 1d6557b0b..2e621dfe8 100644 --- a/src/screens/Developer/APIKeys/KeyManagement.res +++ b/src/screens/Developer/APIKeys/KeyManagement.res @@ -181,6 +181,8 @@ module ApiKeyAddBtn = { let (showModal, setShowModal) = React.useState(_ => false) let initialValues = Dict.make() initialValues->Dict.set("expiration", Never->getStringFromRecordType->JSON.Encode.string) + let isMobileView = MatchMedia.useMobileChecker() + <> @@ -188,7 +190,9 @@ module ApiKeyAddBtn = { text="Create New API Key" leftIcon={CustomIcon( , )} // TODO: Remove `MerchantDetailsManage` permission in future @@ -197,7 +201,8 @@ module ApiKeyAddBtn = { userHasAccess(~groupAccess=AccountManage), )} buttonType=Secondary - buttonSize=Small + buttonSize={isMobileView ? XSmall : Small} + customTextSize={isMobileView ? "text-xs" : ""} onClick={_ => { mixpanelEvent(~eventName="create_new_api_key") setShowModal(_ => true) @@ -354,7 +359,7 @@ module ApiKeysTable = { {

+ className="font-bold absolute top-2 md:top-6 left-0 text-xl text-black text-opacity-75 dark:text-white dark:text-opacity-75"> {"API Keys"->React.string}

Array.length} - tableActions={
+ tableActions={
} /> diff --git a/src/screens/Developer/APIKeys/PublishableAndHashKeySection.res b/src/screens/Developer/APIKeys/PublishableAndHashKeySection.res index bd9706538..562a3a100 100644 --- a/src/screens/Developer/APIKeys/PublishableAndHashKeySection.res +++ b/src/screens/Developer/APIKeys/PublishableAndHashKeySection.res @@ -37,7 +37,7 @@ let make = () => {
-
+
{"Publishable Key"->React.string} @@ -59,18 +59,18 @@ let make = () => {
String.length !== 0}> -
+
{"Payment Response Hash Key"->React.string}
diff --git a/src/screens/Helpers/HelperComponents.res b/src/screens/Helpers/HelperComponents.res index bd85b8af0..4ace0bc92 100644 --- a/src/screens/Helpers/HelperComponents.res +++ b/src/screens/Helpers/HelperComponents.res @@ -72,11 +72,13 @@ module EllipsisText = {

{`${displayValue->String.slice(~start=0, ~end=endValue)}`->React.string}

- handleClick(ev)}> - {"..."->React.string} - + String.length > endValue}> + handleClick(ev)}> + {"..."->React.string} + +