Skip to content

Commit

Permalink
fix(KFLUXUI-302): removing banner
Browse files Browse the repository at this point in the history
  • Loading branch information
StanislavJochman committed Feb 11, 2025
1 parent b10b916 commit b30b244
Showing 1 changed file with 31 additions and 61 deletions.
92 changes: 31 additions & 61 deletions src/components/Overview/IntroBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ import {
Title,
Text,
Button,
Alert,
} from '@patternfly/react-core';
import { useApplications } from '../../hooks/useApplications';
import { ApplicationModel, ComponentModel } from '../../models';
import { APPLICATION_LIST_PATH, IMPORT_PATH } from '../../routes/paths';
import ExternalLink from '../../shared/components/links/ExternalLink';
import { AccessReviewResources } from '../../types';
import { useAccessReviewForModels } from '../../utils/rbac';
import { ButtonWithAccessTooltip } from '../ButtonWithAccessTooltip';
Expand Down Expand Up @@ -48,66 +46,38 @@ const IntroBanner: React.FC = () => {
</Text>
</CardBody>
<CardBody>
{
<>
<ButtonWithAccessTooltip
className="intro-banner__cta"
component={(props) => (
<Link {...props} to={IMPORT_PATH.createPath({ workspaceName: namespace })} />
)}
variant="primary"
data-test="create-application"
isDisabled={!canCreate}
tooltip="You don't have access to create an application"
size="lg"
analytics={{
link_name: 'create-application',
}}
>
Create application
</ButtonWithAccessTooltip>
{applicationsLoaded && applications?.length > 0 ? (
<Button
className="intro-banner__cta"
component={(props) => (
<Link
{...props}
to={APPLICATION_LIST_PATH.createPath({ workspaceName: namespace })}
/>
)}
variant="secondary"
data-test="view-my-applications"
size="lg"
>
View my applications
</Button>
) : undefined}
</>
}
{
<Alert
variant="info"
isInline
title="We have received your request. While you are waiting, please join our Slack channel."
<ButtonWithAccessTooltip
className="intro-banner__cta"
component={(props) => (

Check warning on line 51 in src/components/Overview/IntroBanner.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/Overview/IntroBanner.tsx#L51

Added line #L51 was not covered by tests
<Link {...props} to={IMPORT_PATH.createPath({ workspaceName: namespace })} />
)}
variant="primary"
data-test="create-application"
isDisabled={!canCreate}
tooltip="You don't have access to create an application"
size="lg"
analytics={{
link_name: 'create-application',
}}
>
Create application
</ButtonWithAccessTooltip>
{applicationsLoaded && applications?.length > 0 ? (
<Button
className="intro-banner__cta"
component={(props) => (
<Link

Check warning on line 69 in src/components/Overview/IntroBanner.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/Overview/IntroBanner.tsx#L69

Added line #L69 was not covered by tests
{...props}
to={APPLICATION_LIST_PATH.createPath({ workspaceName: namespace })}
/>
)}
variant="secondary"
data-test="view-my-applications"
size="lg"
>
<p>
We are working hard to get you early access. After we approve your request, we
will send you an email notification with information about how you can access and
start using the service.
</p>
<p>
Join the internal Red Hat Slack workspace here:{' '}
<ExternalLink href="https://redhat-internal.slack.com/" hideIcon>
https://redhat-internal.slack.com/
</ExternalLink>
, and then join our{' '}
<ExternalLink href="https://app.slack.com/client/E030G10V24F/C04PZ7H0VA8">
#konflux-users
</ExternalLink>{' '}
channel.
</p>
</Alert>
}
View my applications
</Button>

Check warning on line 79 in src/components/Overview/IntroBanner.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/Overview/IntroBanner.tsx#L79

Added line #L79 was not covered by tests
) : undefined}
</CardBody>
</Card>
</GridItem>
Expand Down

0 comments on commit b30b244

Please sign in to comment.