Merge pull request #110 from JamesHawkinss/dev

Fix dropdown not rendering
This commit is contained in:
James Hawkins 2022-12-19 07:10:03 +00:00 committed by GitHub
commit 4c50436a9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 43 deletions

View file

@ -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": {

View file

@ -15,6 +15,7 @@ interface DropdownProps {
}
export function Dropdown(props: DropdownProps) {
return (
<div className="relative my-4 max-w-[18rem]">
<Listbox value={props.selectedItem} onChange={props.setSelectedItem}>
{({ open }) => (
@ -55,5 +56,6 @@ export function Dropdown(props: DropdownProps) {
</>
)}
</Listbox>
</div>;
</div>
)
}

View file

@ -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);