From b8fc88e5da3c23e2801e5f47babec02f8bd787c7 Mon Sep 17 00:00:00 2001 From: Edwin Guzman Date: Fri, 20 Sep 2024 10:47:35 -0400 Subject: [PATCH] Not reading from redux store was the issue --- .github/workflows/ci.yml | 2 +- src/app/components/Item/RequestButtons.jsx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 475825dc3..1cc879a55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,7 +96,7 @@ jobs: aws ecs update-service --cluster discovery-ui-edd --service discovery-ui-edd --force-new-deployment publish_production: # needs: test - if: github.ref == 'refs/heads/production' + if: github.ref == 'refs/heads/TGR-50/remediation-update' name: Publish image to ECR and update ECS stack runs-on: ubuntu-latest permissions: diff --git a/src/app/components/Item/RequestButtons.jsx b/src/app/components/Item/RequestButtons.jsx index bfb0e0b36..ac9e34c95 100644 --- a/src/app/components/Item/RequestButtons.jsx +++ b/src/app/components/Item/RequestButtons.jsx @@ -2,8 +2,10 @@ import React from 'react'; import { Link } from 'react-router'; import { aeonUrl } from '../../utils/utils'; import { MediaContext } from '../Application/Application'; +import { useSelector } from 'react-redux'; const RequestButtons = ({ item, bibId, searchKeywords, appConfig, page }) => { + const features = useSelector(state => state.features); const media = React.useContext(MediaContext); const ifAvailableHandler = (handler, available) => (available ? handler : (e) => { e.preventDefault() }) @@ -12,15 +14,12 @@ const RequestButtons = ({ item, bibId, searchKeywords, appConfig, page }) => { closedLocations, recapClosedLocations, nonRecapClosedLocations, - features, } = appConfig; const isRecap = item.isRecap; const allClosed = closedLocations .concat(isRecap ? recapClosedLocations : nonRecapClosedLocations) .includes(''); - console.log({closedLocations, recapClosedLocations, nonRecapClosedLocations, allClosed}) const isAeon = item.aeonUrl && features.includes('aeon-links'); - console.log(item.aeonUrl, features, isAeon) const physRequestButton = () => { if (isAeon || allClosed || !item.physRequestable) {