Skip to content

Commit

Permalink
Add const isKeyVisibilityV1
Browse files Browse the repository at this point in the history
  • Loading branch information
vhande committed Jun 25, 2024
1 parent d95137e commit c520209
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion resources/ts/Components/Integrations/Detail/Credentials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ export const Credentials = ({
const hasAnyCredentials = Boolean(
legacyAuthConsumers.length || authClients.length
);
const isKeyVisibilityV1 = keyVisibility === KeyVisibility.v1
usePolling(
!hasAnyCredentials ||
(keyVisibility === KeyVisibility.v1 && !!keyVisibilityUpgrade),
(isKeyVisibilityV1 && !!keyVisibilityUpgrade),
{ only: ["integration"] }
);
const credentials = useMemo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const CredentialsAuthClients = ({
keyVisibilityUpgrade,
}: Props) => {
const { t } = useTranslation();
const isKeyVisibilityV1 = keyVisibility === KeyVisibility.v1;

const auth0TestClientWithLabels = [
{
Expand Down Expand Up @@ -69,8 +70,8 @@ export const CredentialsAuthClients = ({
<Heading className="font-semibold lg:min-w-60" level={4}>
{t("details.credentials.uitid_v2")}
</Heading>
{keyVisibility === KeyVisibility.v1 ? (
keyVisibility === KeyVisibility.v1 && !!keyVisibilityUpgrade ? (
{isKeyVisibilityV1 ? (
isKeyVisibilityV1 && !!keyVisibilityUpgrade ? (
<Alert variant="info">{t("integrations.pending_credentials")}</Alert>
) : (
<div className="flex flex-col flex-1 gap-4">
Expand Down

0 comments on commit c520209

Please sign in to comment.