From d95962e4055ee41ed0db53c76f562a94a966115e Mon Sep 17 00:00:00 2001 From: Shaun Hamilton Date: Fri, 9 Jul 2021 04:00:04 +0100 Subject: [PATCH] fix(client): adjust project link logic to show files (#42717) --- .../src/client-only-routes/show-project-links.tsx | 14 +++++++------- client/src/redux/prop-types.ts | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/client/src/client-only-routes/show-project-links.tsx b/client/src/client-only-routes/show-project-links.tsx index 7d25a1ef6b..0b5163d660 100644 --- a/client/src/client-only-routes/show-project-links.tsx +++ b/client/src/client-only-routes/show-project-links.tsx @@ -23,14 +23,14 @@ interface IShowProjectLinksProps { type SolutionStateType = { projectTitle: string; - challengeFiles: ChallengeFileType[] | null; + files?: ChallengeFileType[] | null; solution: CompletedChallenge['solution']; isOpen: boolean; }; const initSolutionState: SolutionStateType = { projectTitle: '', - challengeFiles: null, + files: null, solution: null, isOpen: false }; @@ -55,16 +55,16 @@ const ShowProjectLinks = (props: IShowProjectLinksProps): JSX.Element => { return null; } - const { solution, githubLink, challengeFiles } = completedProject; + const { solution, githubLink, files } = completedProject; const onClickHandler = () => setSolutionState({ projectTitle, - challengeFiles, + files, solution, isOpen: true }); - if (challengeFiles) { + if (files) { return (