Skip to content

Commit

Permalink
change for review
Browse files Browse the repository at this point in the history
  • Loading branch information
OraldoDoci committed Oct 18, 2024
1 parent e11a19b commit 1f94e1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next';
import { Party } from '../../../../model/Party';
import { Product } from '../../../../model/Product';
import { interopProductIdList } from '../../../../utils/constants';
import { startWithProductInterop } from '../../../../utils/helperFunctions';
import ActiveProductCardContainer from './components/ActiveProductCardContainer';

type Props = {
Expand Down Expand Up @@ -44,7 +45,7 @@ export default function ActiveProductsSection({ party, products }: Readonly<Prop
.filter(
(us) =>
us.productOnBoardingStatus === 'ACTIVE' &&
(us.productId?.startsWith('prod-interop') && hasMoreThanOneInteropEnv
(startWithProductInterop(us.productId) && hasMoreThanOneInteropEnv
? us.productId === authorizedInteropProducts[0]
: true)
)
Expand Down
4 changes: 3 additions & 1 deletion src/utils/helperFunctions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { INTEROP_PRODUCT_ENUM } from "./constants";

export const compareDates = (
dateA?: Date,
dateB?: Date,
Expand Down Expand Up @@ -34,4 +36,4 @@ export const codeToLabelProduct = (code: string) => {
}
};

export const startWithProductInterop = (id?: string) => id?.startsWith('prod-interop');
export const startWithProductInterop = (id?: string) => id?.startsWith(INTEROP_PRODUCT_ENUM.INTEROP);

0 comments on commit 1f94e1b

Please sign in to comment.