import { Panel } from '@freecodecamp/react-bootstrap'; import Prism from 'prismjs'; import PropTypes from 'prop-types'; import React from 'react'; const prismLang = { css: 'css', js: 'javascript', jsx: 'javascript', html: 'markup' }; const SolutionViewer = ({ challengeFiles, solution = '// The solution is not available for this project' }) => challengeFiles?.length ? ( challengeFiles.map(challengeFile => ( {challengeFile.ext.toUpperCase()}
            
          
)) ) : ( JS
          
        
); SolutionViewer.displayName = 'SolutionViewer'; SolutionViewer.propTypes = { challengeFiles: PropTypes.array, solution: PropTypes.string }; export default SolutionViewer;