|
|
@ -169,15 +169,19 @@ export const GenreSelector = ({
|
|
|
|
loadDefaultGenre();
|
|
|
|
loadDefaultGenre();
|
|
|
|
}, [defaultValue, type]);
|
|
|
|
}, [defaultValue, type]);
|
|
|
|
|
|
|
|
|
|
|
|
const loadGenreOptions = async () => {
|
|
|
|
const loadGenreOptions = async (inputValue: string) => {
|
|
|
|
const results = await axios.get<GenreSliderItem[]>(
|
|
|
|
const results = await axios.get<GenreSliderItem[]>(
|
|
|
|
`/api/v1/discover/genreslider/${type}`
|
|
|
|
`/api/v1/discover/genreslider/${type}`
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
return results.data.map((result) => ({
|
|
|
|
return results.data
|
|
|
|
label: result.name,
|
|
|
|
.map((result) => ({
|
|
|
|
value: result.id,
|
|
|
|
label: result.name,
|
|
|
|
}));
|
|
|
|
value: result.id,
|
|
|
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
.filter(({ label }) =>
|
|
|
|
|
|
|
|
label.toLowerCase().includes(inputValue.toLowerCase())
|
|
|
|
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|