Updated names for uniformity
This commit is contained in:
@@ -11,11 +11,11 @@ import ThemePlaylistModal from './ThemePlaylistModal';
|
||||
|
||||
function ThemePlaylists() {
|
||||
const themesEndpoint = 'api/themes';
|
||||
const { data: allThemes } = useQueryAPI({
|
||||
const { data: allThemeData } = useQueryAPI({
|
||||
endpoint: themesEndpoint,
|
||||
});
|
||||
const themePlaylistsEndpoint = 'api/themePlaylists';
|
||||
const { data: themePlaylists } = useQueryAPI({
|
||||
const { data: themePlaylistData } = useQueryAPI({
|
||||
endpoint: themePlaylistsEndpoint,
|
||||
});
|
||||
const defaultPlaylist = {
|
||||
@@ -60,7 +60,7 @@ function ThemePlaylists() {
|
||||
defaultPlaylist={defaultPlaylist}
|
||||
setSelectedPlaylist={setSelectedPlaylist}
|
||||
handleSavePlaylist={handleSavePlaylist}
|
||||
allThemes={allThemes}
|
||||
allThemes={allThemeData}
|
||||
createPlaylist={mutateAsync}
|
||||
/>
|
||||
<Stack h={'100%'} w={'100%'}>
|
||||
@@ -84,7 +84,7 @@ function ThemePlaylists() {
|
||||
</Text>
|
||||
</Group>
|
||||
<Group justify='center' align='center' pos={'relative'}>
|
||||
{themePlaylists
|
||||
{themePlaylistData
|
||||
?.filter((playlist: ThemePlaylist) => playlist.default === 1)
|
||||
?.filter((a: ThemePlaylist) =>
|
||||
a.name.toLowerCase().includes(debouncedSearch.toLowerCase()),
|
||||
@@ -113,7 +113,7 @@ function ThemePlaylists() {
|
||||
<ThemePlaylistCard
|
||||
cardPlaylist={cardPlaylist}
|
||||
handleOpen={handleOpen}
|
||||
allThemes={allThemes}
|
||||
allThemes={allThemeData}
|
||||
/>
|
||||
</Box>
|
||||
</Group>
|
||||
@@ -131,7 +131,7 @@ function ThemePlaylists() {
|
||||
pos={'relative'}
|
||||
mb={isMobile ? '6rem' : undefined}
|
||||
>
|
||||
{themePlaylists
|
||||
{themePlaylistData
|
||||
?.filter((playlist: ThemePlaylist) => playlist.default === 0)
|
||||
?.filter((a: ThemePlaylist) =>
|
||||
a.name.toLowerCase().includes(debouncedSearch.toLowerCase()),
|
||||
@@ -161,7 +161,7 @@ function ThemePlaylists() {
|
||||
<ThemePlaylistCard
|
||||
cardPlaylist={cardPlaylist}
|
||||
handleOpen={handleOpen}
|
||||
allThemes={allThemes}
|
||||
allThemes={allThemeData}
|
||||
/>
|
||||
</Box>
|
||||
</Group>
|
||||
|
||||
Reference in New Issue
Block a user