From 06951eb5ff568c10f905c96cf5a2589a4ccf6b1f Mon Sep 17 00:00:00 2001 From: Brandon Egger Date: Thu, 16 Mar 2023 22:22:37 -0500 Subject: [PATCH] add free icon for free apps --- src/components/ResourceTable.tsx | 46 +++++++++++++++++++++++--------- src/utils/enumWordLut.ts | 10 +++---- 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/src/components/ResourceTable.tsx b/src/components/ResourceTable.tsx index 6ed4650..114a6cf 100644 --- a/src/components/ResourceTable.tsx +++ b/src/components/ResourceTable.tsx @@ -10,13 +10,31 @@ import { ChevronDownIcon } from '@heroicons/react/24/outline'; const ResourceEntry = ({resource}: {resource: AuditoryResource}) => { const ResourceInfo = ({resource}: {resource: AuditoryResource}) => { const PriceIcons = ({type}: {type: PaymentType}) => { - - return ( -
- - -
- ) + switch(type) { + case "FREE": { + return ( +
+ + free + +
+ ) + } + case "SUBSCRIPTION_MONTHLY": { +
+ + +
+ } + case "SUBSCRIPTION_WEEKLY": { + return ( +
+ + +
+ ) + } + } } const PlatformInfo = ({platformLinks}: {platformLinks: PlatformLink[]}) => { @@ -102,11 +120,13 @@ const ResourceEntry = ({resource}: {resource: AuditoryResource}) => { return (
-
-
    - {skillsComponents} -
-
+ { skillsComponents.length > 0 ? +
+
    + {skillsComponents} +
+
: <> + }
) @@ -117,7 +137,7 @@ const ResourceEntry = ({resource}: {resource: AuditoryResource}) => { - + diff --git a/src/utils/enumWordLut.ts b/src/utils/enumWordLut.ts index 9a9ce43..ea681c3 100644 --- a/src/utils/enumWordLut.ts +++ b/src/utils/enumWordLut.ts @@ -27,25 +27,25 @@ export const translateEnumPlatform = (value: Platform) => { export const translateEnumSkill = (value: Skill) => { switch(value) { case "ENVIRONMENT": { - return "not done"; + return "Environmental Sounds"; } case "BACKGROUND": { return "not done"; } case "DISCOURSE": { - return "not done"; + return "Discourse Level"; } case "MUSIC": { - return "Music" + return "Music Appreciation" } case "PHONEMES": { - return "not done"; + return "Word Recognition (phonemes)"; } case "SENTENCES": { return "Sentences" } case "WORDS": { - return "Word Recognition" + return "Words (stressed syllables)" } } } \ No newline at end of file