diff --git a/src/frontend/src/constants/constants.ts b/src/frontend/src/constants/constants.ts index dee87dcdb..006a030b5 100644 --- a/src/frontend/src/constants/constants.ts +++ b/src/frontend/src/constants/constants.ts @@ -623,3 +623,13 @@ export const BASE_URL_API = "/api/v1/"; export const SIGN_UP_SUCCESS = "Account created! Await admin activation. "; + +export const API_PAGE_PARAGRAPH_1 = "Your secret API keys are listed below. Please note that we do not display your secret API keys again after you generate them."; + +export const API_PAGE_PARAGRAPH_2 = "Do not share your API key with others, or expose it in the browser or other client-side code."; + +export const API_PAGE_USER_KEYS = "This user does not have any keys assigned at the moment." + +export const LAST_USED_SPAN_1 = "The last time this key was used."; + +export const LAST_USED_SPAN_2 = "Accurate to within the hour from the most recent usage."; \ No newline at end of file diff --git a/src/frontend/src/pages/ApiKeysPage/index.tsx b/src/frontend/src/pages/ApiKeysPage/index.tsx index d4f6b616a..12ddff768 100644 --- a/src/frontend/src/pages/ApiKeysPage/index.tsx +++ b/src/frontend/src/pages/ApiKeysPage/index.tsx @@ -19,6 +19,7 @@ import SecretKeyModal from "../../modals/SecretKeyModal"; import moment from "moment"; import Header from "../../components/headerComponent"; import { ApiKey } from "../../types/components"; +import { API_PAGE_PARAGRAPH_1, API_PAGE_PARAGRAPH_2, API_PAGE_USER_KEYS, LAST_USED_SPAN_1, LAST_USED_SPAN_2 } from "../../constants/constants"; export default function ApiKeysPage() { const [loadingKeys, setLoadingKeys] = useState(true); @@ -72,8 +73,7 @@ export default function ApiKeysPage() { return (
- The last time this key was used.

Accurate to within the hour - from the most recent usage. + {LAST_USED_SPAN_1}

{LAST_USED_SPAN_2}
); @@ -93,11 +93,8 @@ export default function ApiKeysPage() { API keys

- Your secret API keys are listed below. Please note that we - do not display your secret API keys again after you - generate them.

- Do not share your API key with others, or expose it in the - browser or other client-side code. + {API_PAGE_PARAGRAPH_1}
+ {API_PAGE_PARAGRAPH_2}

@@ -109,8 +106,7 @@ export default function ApiKeysPage() { <>

- This user does not have any keys assigned at the - moment. + {API_PAGE_USER_KEYS}