mirror of
https://github.com/movie-web/movie-web.git
synced 2025-01-01 17:25:59 +00:00
Merge pull request #110 from JamesHawkinss/dev
Fix dropdown not rendering
This commit is contained in:
commit
4c50436a9e
|
@ -20,6 +20,10 @@
|
||||||
"invalidUrl": "Your URL may be invalid",
|
"invalidUrl": "Your URL may be invalid",
|
||||||
"arrowText": "Go back"
|
"arrowText": "Go back"
|
||||||
},
|
},
|
||||||
|
"seasons": {
|
||||||
|
"season": "Season {{season}}",
|
||||||
|
"failed": "Failed to get season data"
|
||||||
|
},
|
||||||
"notFound": {
|
"notFound": {
|
||||||
"backArrow": "Back to home",
|
"backArrow": "Back to home",
|
||||||
"media": {
|
"media": {
|
||||||
|
|
|
@ -15,6 +15,7 @@ interface DropdownProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Dropdown(props: DropdownProps) {
|
export function Dropdown(props: DropdownProps) {
|
||||||
|
return (
|
||||||
<div className="relative my-4 max-w-[18rem]">
|
<div className="relative my-4 max-w-[18rem]">
|
||||||
<Listbox value={props.selectedItem} onChange={props.setSelectedItem}>
|
<Listbox value={props.selectedItem} onChange={props.setSelectedItem}>
|
||||||
{({ open }) => (
|
{({ open }) => (
|
||||||
|
@ -55,5 +56,6 @@ export function Dropdown(props: DropdownProps) {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Listbox>
|
</Listbox>
|
||||||
</div>;
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ export function Seasons(props: SeasonsProps) {
|
||||||
|
|
||||||
const mapSeason = (season: MWMediaSeason) => ({
|
const mapSeason = (season: MWMediaSeason) => ({
|
||||||
id: season.id,
|
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);
|
const options = seasons.seasons.map(mapSeason);
|
||||||
|
|
Loading…
Reference in a new issue