Skip to content

Commit

Permalink
[Gitar] Updating TSX files
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitar committed Sep 16, 2024
1 parent 0d657b2 commit 0749b76
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import { JIRA_INFO } from '../../ViewIntegration/JiraIntegration/JiraIntegration
import { StyledCardsGrid } from '../IntegrationList.styles';
import { RequestIntegrationCard } from '../RequestIntegrationCard/RequestIntegrationCard';
import { OFFICIAL_SDKS } from './SDKs';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { useUiFlag } from 'hooks/useUiFlag';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';

interface IAvailableIntegrationsProps {
providers: AddonTypeSchema[];
Expand Down Expand Up @@ -54,9 +51,6 @@ const StyledGrayContainer = styled('div')(({ theme }) => ({
export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
providers,
}) => {
const { isEnterprise } = useUiConfig();
const signalsEnabled = useUiFlag('signals');

const customProviders = [JIRA_INFO];
const serverSdks = OFFICIAL_SDKS.filter((sdk) => sdk.type === 'server');
const clientSdks = OFFICIAL_SDKS.filter((sdk) => sdk.type === 'client');
Expand Down Expand Up @@ -97,17 +91,6 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
/>
),
)}
<ConditionallyRender
condition={isEnterprise() && signalsEnabled}
show={
<IntegrationCard
icon='signals'
title='Signals'
description='Signal endpoints allow third-party services to send signals to Unleash.'
link='/integrations/signals'
/>
}
/>
{/* TODO: sort providers from backend with custom providers */}
{customProviders?.map(
({ name, displayName, description }) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import { StyledCardsGrid } from '../IntegrationList.styles';
import { IntegrationCard } from '../IntegrationCard/IntegrationCard';
import type { VFC } from 'react';
import { Typography, styled } from '@mui/material';
import { useSignalEndpoints } from 'hooks/api/getters/useSignalEndpoints/useSignalEndpoints';
import { useUiFlag } from 'hooks/useUiFlag';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';

const StyledConfiguredSection = styled('section')(({ theme }) => ({
display: 'flex',
Expand All @@ -27,10 +23,6 @@ export const ConfiguredIntegrations: VFC<ConfiguredIntegrationsProps> = ({
addons,
providers,
}) => {
const { signalEndpoints } = useSignalEndpoints();
const signalsEnabled = useUiFlag('signals');
const { isEnterprise } = useUiConfig();

const ref = useLoading(loading || false);

return (
Expand Down Expand Up @@ -73,27 +65,6 @@ export const ConfiguredIntegrations: VFC<ConfiguredIntegrationsProps> = ({
/>
);
})}
<ConditionallyRender
condition={
isEnterprise() &&
signalsEnabled &&
signalEndpoints.length > 0
}
show={
<IntegrationCard
variant='stacked'
icon='signals'
title='Signals'
description={`${
signalEndpoints.length
} signal endpoint${
signalEndpoints.length === 1 ? '' : 's'
} configured`}
link='/integrations/signals'
configureActionText='View signal endpoints'
/>
}
/>
</StyledCardsGrid>
</StyledConfiguredSection>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { ReactNode } from 'react';
import { useUiFlag } from 'hooks/useUiFlag';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { useLocalStorageState } from 'hooks/useLocalStorageState';
import {
Badge,
Expand Down Expand Up @@ -86,16 +84,13 @@ interface INewInUnleashProps {

export const NewInUnleash = ({
mode = 'full',
onItemClick,
onMiniModeClick,
}: INewInUnleashProps) => {
const { trackEvent } = usePlausibleTracker();
const [seenItems, setSeenItems] = useLocalStorageState(
'new-in-unleash-seen:v1',
new Set(),
);
const { isEnterprise } = useUiConfig();
const signalsEnabled = useUiFlag('signals');

const items: NewItem[] = [
{
Expand All @@ -105,7 +100,7 @@ export const NewInUnleash = ({
preview: <SignalsPreview />,
link: '/integrations/signals',
docsLink: 'https://docs.getunleash.io/reference/signals',
show: isEnterprise() && signalsEnabled,
show: false,
longDescription: (
<>
<p>
Expand Down

0 comments on commit 0749b76

Please sign in to comment.