More typing
This commit is contained in:
@@ -21,12 +21,11 @@ function ThemePlaylists() {
|
||||
const { mutateAsync } = useMutationAPI();
|
||||
const [opened, { open, close }] = useDisclosure(false);
|
||||
const [selectedPlaylist, setSelectedPlaylist] = useState<any>({});
|
||||
const { currentThemePlaylist, setCurrentThemePlaylist, theme, isMobile } =
|
||||
useCommonHooks();
|
||||
const { currentThemePlaylist, theme, isMobile } = useCommonHooks();
|
||||
const [searchValue, setSearchValue] = useState('');
|
||||
const [debouncedSearch] = useDebouncedValue(searchValue, 500);
|
||||
|
||||
const handleOpen = (playlist: any) => {
|
||||
const handleOpen = (playlist: ThemePlaylist) => {
|
||||
setSelectedPlaylist(playlist);
|
||||
open();
|
||||
};
|
||||
@@ -106,8 +105,6 @@ function ThemePlaylists() {
|
||||
<ThemePlaylistCard
|
||||
cardPlaylist={cardPlaylist}
|
||||
handleOpen={handleOpen}
|
||||
currentThemePlaylist={currentThemePlaylist}
|
||||
setCurrentThemePlaylist={setCurrentThemePlaylist}
|
||||
allThemes={allThemes}
|
||||
/>
|
||||
</Box>
|
||||
@@ -131,7 +128,7 @@ function ThemePlaylists() {
|
||||
?.filter((a: ThemePlaylist) =>
|
||||
a.name.toLowerCase().includes(debouncedSearch.toLowerCase()),
|
||||
)
|
||||
.sort((a: any, b: any) => (a.name > b.name ? 1 : -1))
|
||||
.sort((a: ThemePlaylist, b: ThemePlaylist) => (a.name > b.name ? 1 : -1))
|
||||
.map((cardPlaylist: ThemePlaylist) => {
|
||||
return (
|
||||
<Group key={cardPlaylist.name} pos={'relative'}>
|
||||
|
||||
Reference in New Issue
Block a user