Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
at main 37 lines 1.1 kB view raw
1import { type Maybe, MetadataLicenseType } from "@hey/indexer"; 2 3const getAssetLicense = ( 4 licenseId: Maybe<MetadataLicenseType> | undefined 5): { 6 helper: string; 7 label: string; 8} | null => { 9 if (!licenseId) { 10 return null; 11 } 12 13 switch (licenseId) { 14 case MetadataLicenseType.Cco: 15 return { 16 helper: 17 "Anyone can use, modify and distribute the work without any restrictions or need for attribution. CC0", 18 label: "CC0 - no restrictions" 19 }; 20 case MetadataLicenseType.TbnlCdNplLegal: 21 return { 22 helper: 23 "You allow the collector to use the content for any purpose, except creating or sharing any derivative works, such as remixes.", 24 label: "Commercial rights for the collector" 25 }; 26 case MetadataLicenseType.TbnlNcDNplLegal: 27 return { 28 helper: 29 "You allow the collector to use the content for any personal, non-commercial purpose, except creating or sharing any derivative works, such as remixes.", 30 label: "Personal rights for the collector" 31 }; 32 default: 33 return null; 34 } 35}; 36 37export default getAssetLicense;