Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(idm home page): Make the href to idm home page a parameter #222

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/services/ui/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ custom:
project: ${env:PROJECT}
stage: ${opt:stage, self:provider.stage}
region: ${opt:region, self:provider.region}
idmInfo: ${ssm:/aws/reference/secretsmanager/${self:custom.project}/${sls:stage}/idmInfo, ""}
serverlessTerminationProtection:
stages:
- master
Expand All @@ -44,6 +45,7 @@ custom:
VITE_COGNITO_USER_POOL_CLIENT_DOMAIN=${param:CognitoUserPoolClientDomain}
VITE_COGNITO_REDIRECT_SIGNIN=${param:ApplicationEndpointUrl}
VITE_COGNITO_REDIRECT_SIGNOUT=${param:ApplicationEndpointUrl}
VITE_IDM_HOME_URL=${self:custom.idmInfo.home_url, "https://test.home.idm.cms.gov"}
""" > .env.local
yarn build
deploy:finalize: |
Expand Down
3 changes: 2 additions & 1 deletion src/services/ui/src/components/UsaBanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import UsFlag from "@/assets/us_flag_small.png";
import { useMediaQuery } from "@/hooks";
import { useUserContext } from "../Context/userContext";
import { useLoaderData } from "react-router-dom";
import config from "@/config";

export const UsaBanner = () => {
const [isOpen, setIsOpen] = useState(false);
Expand Down Expand Up @@ -135,7 +136,7 @@ const NoRole = () => {
You do not have access to view the entire application.{" "}
<a
rel="noreferrer"
href="https://test.home.idm.cms.gov/"
href={config.idm.home_url}
target="_blank"
className="text-blue-600 inline no-underline"
>
Expand Down
3 changes: 3 additions & 0 deletions src/services/ui/src/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const config = {
REDIRECT_SIGNIN: import.meta.env.VITE_COGNITO_REDIRECT_SIGNIN,
REDIRECT_SIGNOUT: import.meta.env.VITE_COGNITO_REDIRECT_SIGNOUT,
},
idm: {
home_url: import.meta.env.VITE_IDM_HOME_URL,
},
};

export default config;
Loading