Updated names for uniformity
This commit is contained in:
@@ -24,6 +24,7 @@ function ThemePlaylistCard({
|
||||
handleOpen: (cardPlaylist: ThemePlaylist) => void;
|
||||
allThemes: Theme[];
|
||||
}) {
|
||||
const themePlaylistEndpoint = 'api/themePlaylists';
|
||||
const [hover, setHover] = useState(false);
|
||||
const { setThemeName, setCurrentThemePlaylist, theme, handleDelete } = useCommonHooks();
|
||||
const syncableLists = ['All', 'Backgrounds', 'No Backgrounds'];
|
||||
@@ -45,6 +46,7 @@ function ThemePlaylistCard({
|
||||
<DeleteItemModal
|
||||
modalOpened={modalOpened}
|
||||
handleClose={closeModal}
|
||||
handleDelete={() => handleDelete(cardPlaylist, 'api/themePlaylists')}
|
||||
title='Delete Theme Playlist'
|
||||
body={
|
||||
<Stack gap={0} w={'100%'} h={'150px'} align='center'>
|
||||
@@ -61,27 +63,6 @@ function ThemePlaylistCard({
|
||||
}}
|
||||
>{`"${cardPlaylist.name}"`}</Text>
|
||||
<Text c='red'>This action cannot be undone!</Text>
|
||||
<Group pos={'absolute'} bottom={8}>
|
||||
<Button
|
||||
color={'red'}
|
||||
styles={{ label: { color: 'black' } }}
|
||||
onClick={() => {
|
||||
handleDelete(cardPlaylist, 'api/themePlaylists');
|
||||
closeModal();
|
||||
}}
|
||||
>
|
||||
Delete
|
||||
</Button>
|
||||
<Button
|
||||
color={'grey'}
|
||||
styles={{ label: { color: 'black' } }}
|
||||
onClick={() => {
|
||||
closeModal();
|
||||
}}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
</Group>
|
||||
</Stack>
|
||||
}
|
||||
/>
|
||||
@@ -124,7 +105,7 @@ function ThemePlaylistCard({
|
||||
if (cardPlaylist.name === 'All') {
|
||||
mutateAsync({
|
||||
method: 'PATCH',
|
||||
endpoint: 'api/themePlaylists',
|
||||
endpoint: themePlaylistEndpoint,
|
||||
body: {
|
||||
id: cardPlaylist.id,
|
||||
name: 'All',
|
||||
@@ -135,7 +116,7 @@ function ThemePlaylistCard({
|
||||
if (cardPlaylist.name === 'Backgrounds') {
|
||||
mutateAsync({
|
||||
method: 'PATCH',
|
||||
endpoint: 'api/themePlaylists',
|
||||
endpoint: themePlaylistEndpoint,
|
||||
body: {
|
||||
id: cardPlaylist.id,
|
||||
name: 'Backgrounds',
|
||||
@@ -152,7 +133,7 @@ function ThemePlaylistCard({
|
||||
if (cardPlaylist.name === 'No Backgrounds') {
|
||||
mutateAsync({
|
||||
method: 'PATCH',
|
||||
endpoint: 'api/themePlaylists',
|
||||
endpoint: themePlaylistEndpoint,
|
||||
body: {
|
||||
id: cardPlaylist.id,
|
||||
name: 'No Backgrounds',
|
||||
|
||||
Reference in New Issue
Block a user