How to use the @ndla/licenses/lib/licenses.getLicenseByAbbreviation function in @ndla/licenses

To help you get started, we’ve selected a few @ndla/licenses examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NDLANO / learningpath-frontend / src / learningPath / step / LearningPathStepLicense.js View on Github external
const LearningPathStepLicense = ({ learningPathStep, copyright }) => {
  if (!learningPathStep.license || !learningPathStep.license.license) {
    return null;
  }
  const license = getLicenseByAbbreviation(learningPathStep.license.license);
  const licenseText =
    license.rights.length === 0 ? (
      polyglot.t('learningPathStep.license', {
        license: learningPathStep.license.description,
      })
    ) : (
      
    );

  return (
    <span>
      {learningPathStep.license.url ? (
        <div>
          </div></span>

@ndla/licenses

A simple library for retrieving license information for NDLA

GPL-3.0
Latest version published 2 months ago

Package Health Score

76 / 100
Full package analysis