Typing and Density settings
This commit is contained in:
@@ -20,7 +20,7 @@ function ThemePlaylists() {
|
||||
});
|
||||
const { mutateAsync } = useMutationAPI();
|
||||
const [opened, { open, close }] = useDisclosure(false);
|
||||
const [selectedPlaylist, setSelectedPlaylist] = useState<any>({});
|
||||
const [selectedPlaylist, setSelectedPlaylist] = useState<ThemePlaylist | undefined>();
|
||||
const { currentThemePlaylist, theme, isMobile } = useCommonHooks();
|
||||
const [searchValue, setSearchValue] = useState('');
|
||||
const [debouncedSearch] = useDebouncedValue(searchValue, 500);
|
||||
@@ -31,15 +31,15 @@ function ThemePlaylists() {
|
||||
};
|
||||
|
||||
const handleClose = () => {
|
||||
setSelectedPlaylist({});
|
||||
setSelectedPlaylist(undefined);
|
||||
close();
|
||||
};
|
||||
|
||||
const handleSavePlaylist = () => {
|
||||
mutateAsync({
|
||||
method: selectedPlaylist.id === undefined ? 'POST' : 'PATCH',
|
||||
method: selectedPlaylist?.id === undefined ? 'POST' : 'PATCH',
|
||||
endpoint: themePlaylistsEndpoint,
|
||||
body: selectedPlaylist,
|
||||
body: selectedPlaylist ?? {},
|
||||
});
|
||||
close();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user