diff --git a/client/src/templates/Challenges/exam-download/show.css b/client/src/templates/Challenges/exam-download/show.css new file mode 100644 index 00000000000..8492d0bce7a --- /dev/null +++ b/client/src/templates/Challenges/exam-download/show.css @@ -0,0 +1,4 @@ +.exam-download-buttons { + display: flex; + flex-direction: column; +} diff --git a/client/src/templates/Challenges/exam-download/show.tsx b/client/src/templates/Challenges/exam-download/show.tsx index 1ec44f73514..b6c989a7530 100644 --- a/client/src/templates/Challenges/exam-download/show.tsx +++ b/client/src/templates/Challenges/exam-download/show.tsx @@ -6,7 +6,9 @@ import { Dropdown, MenuItem, Spacer, - Container + Container, + Row, + Col } from '@freecodecamp/ui'; import { isEmpty } from 'lodash'; import { useTranslation, withTranslation } from 'react-i18next'; @@ -27,6 +29,8 @@ import { isChallengeCompletedSelector } from '../redux/selectors'; import { Attempts } from './attempts'; import ExamTokenControls from './exam-token-controls'; +import './show.css'; + interface GitProps { tag_name: string; assets: { @@ -171,6 +175,8 @@ function ShowExamDownload({ }; }); + console.log('missing prerequisites:', missingPrerequisites); + return ( @@ -179,77 +185,80 @@ function ShowExamDownload({ - - - {title} - - - {!!missingPrerequisites.length && ( - - )} -

{t('exam.download-header')}

-

{t('exam.explanation')}

- - {isSignedIn && ( - <> -

{t('exam.attempts')}

- - - - - )} -

- {t('exam.version', { - version: latestVersion || '...' - })} -

- {/* TODO: confirm this works on MacOS */} - - - - {!downloadLink && ( - <> + + - {t('exam.unable-to-detect-os')} - - )} - - - {t('exam.download-details')} - - {downloadLinks - .filter(link => !link.match(/\.sig|\.json/)) - .map((link, index) => { - const urlEnd = link.split('/').pop() ?? ''; - return ( - - {urlEnd} - - ); + + {title} + + + {!!missingPrerequisites.length && ( + + )} +

{t('exam.download-header')}

+

{t('exam.explanation')}

+ + {isSignedIn && ( + <> +

{t('exam.attempts')}

+ + + + + )} +

+ {t('exam.version', { + version: latestVersion || '...' })} - - - - {t('exam.download-trouble')}{' '} - support@freecodecamp.org - +

+ {/* TODO: confirm this works on MacOS */} + + +
+ {downloadLink ? ( + + ) : ( + {t('exam.unable-to-detect-os')} + )} +
+ + + {t('exam.download-details')} + + {downloadLinks + .filter(link => !link.match(/\.sig|\.json/)) + .map((link, index) => { + const urlEnd = link.split('/').pop() ?? ''; + return ( + + {urlEnd} + + ); + })} + + + + {t('exam.download-trouble')}{' '} + + support@freecodecamp.org + + + +
);