From 459223a030a1f60302fc972adf47ab64d2286958 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Sun, 18 Dec 2022 19:28:58 +0000 Subject: [PATCH 1/3] Update Dropdown.tsx --- src/components/Dropdown.tsx | 84 +++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/src/components/Dropdown.tsx b/src/components/Dropdown.tsx index 9ebef561..a73ad138 100644 --- a/src/components/Dropdown.tsx +++ b/src/components/Dropdown.tsx @@ -15,45 +15,47 @@ interface DropdownProps { } export function Dropdown(props: DropdownProps) { -
- - {({ open }) => ( - <> - - {props.selectedItem.name} - - - - - - - {props.options.map((opt) => ( - - `relative cursor-default select-none py-2 pl-10 pr-4 ${ - active ? "bg-denim-400 text-bink-700" : "text-white" - }` - } - key={opt.id} - value={opt} - > - {opt.name} - - ))} - - - - )} - -
; + return ( +
+ + {({ open }) => ( + <> + + {props.selectedItem.name} + + + + + + + {props.options.map((opt) => ( + + `relative cursor-default select-none py-2 pl-10 pr-4 ${ + active ? "bg-denim-400 text-bink-700" : "text-white" + }` + } + key={opt.id} + value={opt} + > + {opt.name} + + ))} + + + + )} + +
+ ) } From 118ba05ee684470b5bd92023e269be8f011d75b3 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Sun, 18 Dec 2022 19:35:24 +0000 Subject: [PATCH 2/3] Update Seasons.tsx --- src/components/layout/Seasons.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/layout/Seasons.tsx b/src/components/layout/Seasons.tsx index 6dca785a..b6baab05 100644 --- a/src/components/layout/Seasons.tsx +++ b/src/components/layout/Seasons.tsx @@ -75,7 +75,7 @@ export function Seasons(props: SeasonsProps) { const mapSeason = (season: MWMediaSeason) => ({ id: season.id, - name: season.title || `${t('seasons.season')} ${season.sort}`, + name: season.title || `${t('seasons.season', { season: season.sort })}`, }); const options = seasons.seasons.map(mapSeason); From 84fd5e5133c92117bddebcb934cd3b684bf29939 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Sun, 18 Dec 2022 19:35:28 +0000 Subject: [PATCH 3/3] Update translation.json --- public/locales/en-GB/translation.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/locales/en-GB/translation.json b/public/locales/en-GB/translation.json index cbc2eba3..f50d3c0b 100644 --- a/public/locales/en-GB/translation.json +++ b/public/locales/en-GB/translation.json @@ -20,6 +20,10 @@ "invalidUrl": "Your URL may be invalid", "arrowText": "Go back" }, + "seasons": { + "season": "Season {{season}}", + "failed": "Failed to get season data" + }, "notFound": { "backArrow": "Back to home", "media": { @@ -43,4 +47,4 @@ "errorBoundary": { "text": "The app encountered an error and wasn't able to recover, please report it to the" } -} \ No newline at end of file +}