Skip to content

Commit

Permalink
Update ClaimBanner
Browse files Browse the repository at this point in the history
Signed-off-by: Mirjam Aulbach <[email protected]>
  • Loading branch information
programmiri committed Oct 4, 2023
1 parent 7092d4b commit c8bbeff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions coral/src/app/features/components/ClaimBanner.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const testProps = {
claimEntity: mockClaimEntity,
isError: false,
hasOpenClaimRequest: false,
hasOpenRequest: false,
hasOpenRequestOnAnyEnv: false,
entityOwner: "teamname",
};

Expand Down Expand Up @@ -70,7 +70,7 @@ describe("ClaimBanner", () => {
<ClaimBanner
{...testProps}
entityType={"topic"}
hasOpenRequest={true}
hasOpenRequestOnAnyEnv={true}
/>
);
});
Expand All @@ -92,7 +92,7 @@ describe("ClaimBanner", () => {
<ClaimBanner
{...testProps}
entityType={"connector"}
hasOpenRequest={true}
hasOpenRequestOnAnyEnv={true}
/>
);
});
Expand All @@ -115,7 +115,7 @@ describe("ClaimBanner", () => {
{...testProps}
entityType={"topic"}
hasOpenClaimRequest={true}
hasOpenRequest={true}
hasOpenRequestOnAnyEnv={true}
/>,
{
memoryRouter: true,
Expand Down Expand Up @@ -151,7 +151,7 @@ describe("ClaimBanner", () => {
{...testProps}
entityType={"connector"}
hasOpenClaimRequest={true}
hasOpenRequest={true}
hasOpenRequestOnAnyEnv={true}
/>,
{
memoryRouter: true,
Expand Down
8 changes: 4 additions & 4 deletions coral/src/app/features/components/ClaimBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import illustration from "src/app/images/topic-details-banner-Illustration.svg";
interface ClaimBannerProps {
entityType: "topic" | "connector";
entityName: string;
hasOpenRequest: boolean;
hasOpenRequestOnAnyEnv: boolean;
hasOpenClaimRequest: boolean;
claimEntity: () => void;
isError: boolean;
Expand All @@ -17,14 +17,14 @@ const ClaimBanner = ({
entityType,
entityName,
hasOpenClaimRequest,
hasOpenRequest,
hasOpenRequestOnAnyEnv,
claimEntity,
isError,
errorMessage,
entityOwner,
}: ClaimBannerProps) => {
// if there is an open claim request, hasOpenRequest is true, too
if (hasOpenRequest && !hasOpenClaimRequest) {
// if there is an open claim request, hasOpenRequestOnAnyEnv is true, too
if (hasOpenRequestOnAnyEnv && !hasOpenClaimRequest) {
// We do not render an InternalLinkButton to the Requests page for this state...
// .. because a user cannot see the requests opened by members of other teams
return (
Expand Down

0 comments on commit c8bbeff

Please sign in to comment.