From a5440364732549c7375cbee4baabcbcdef4019be Mon Sep 17 00:00:00 2001 From: Mateusz Tylka Date: Thu, 23 Feb 2023 21:04:37 +0100 Subject: [PATCH] apply repo key to HowTo --- src/api/getFullUserInfo.js | 2 -- .../specific_challenge/HowTo/sections/HowToContent.js | 8 +++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/api/getFullUserInfo.js b/src/api/getFullUserInfo.js index cb60749..53544eb 100644 --- a/src/api/getFullUserInfo.js +++ b/src/api/getFullUserInfo.js @@ -7,8 +7,6 @@ const getFullUser = (setDataState, setLoadingState) => { }) .then(response => response.json()) .then(data => { - console.log('getFullUser'); - console.log(data); setDataState(data); if (setLoadingState) setLoadingState(false); diff --git a/src/components/specific_challenge/HowTo/sections/HowToContent.js b/src/components/specific_challenge/HowTo/sections/HowToContent.js index 73dd8de..c0b827c 100644 --- a/src/components/specific_challenge/HowTo/sections/HowToContent.js +++ b/src/components/specific_challenge/HowTo/sections/HowToContent.js @@ -17,6 +17,12 @@ const HowToContent = (props) => { } }; + const repoKeyRender = () => { + if (props.userFullInfo) { + return props.userFullInfo.individualKey; + } return 'REPO_KEY_HERE'; + }; + return ( { > - Add the following ssh key REPO_KEY_HERE to + Add the following ssh key {repoKeyRender()} to your deploy keys in your git repository settings.