Background uploads
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Box, Group, Stack, Text } from '@mantine/core';
|
||||
import { Box, Group, SimpleGrid, Stack, Text } from '@mantine/core';
|
||||
import { useDebouncedValue, useDisclosure } from '@mantine/hooks';
|
||||
import { useCommonHooks, useMutationAPI, useQueryAPI } from 'hooks';
|
||||
import { useEffect, useState } from 'react';
|
||||
@@ -258,41 +258,43 @@ function ThemePlaylists() {
|
||||
mb={isMobile ? '6rem' : undefined}
|
||||
>
|
||||
{themePlaylists.length > 0 ? (
|
||||
themePlaylists
|
||||
.filter((playlist: ThemePlaylist) => playlist.default === 0)
|
||||
.sort((a: ThemePlaylist, b: ThemePlaylist) =>
|
||||
a.name > b.name ? 1 : -1,
|
||||
)
|
||||
.map((cardPlaylist: ThemePlaylist) => {
|
||||
return (
|
||||
<Group key={cardPlaylist.name} pos={'relative'}>
|
||||
{cardPlaylist.name === currentThemePlaylist && (
|
||||
<FiChevronRight
|
||||
style={{
|
||||
position: 'absolute',
|
||||
left: -14,
|
||||
zIndex: 10,
|
||||
fontSize: '2rem',
|
||||
fontWeight: 'bold',
|
||||
borderRadius: '50%',
|
||||
backgroundColor: 'var(--mantine-color-border-0)',
|
||||
color:
|
||||
theme.borderColor === theme.primaryColor
|
||||
? 'var(--mantine-color-accent-0)'
|
||||
: 'var(--mantine-color-primary-0)',
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<Box>
|
||||
<ThemePlaylistCard
|
||||
cardPlaylist={cardPlaylist}
|
||||
handleOpen={handleOpen}
|
||||
allThemes={allThemeData}
|
||||
/>
|
||||
</Box>
|
||||
</Group>
|
||||
);
|
||||
})
|
||||
<SimpleGrid cols={4}>
|
||||
{themePlaylists
|
||||
.filter((playlist: ThemePlaylist) => playlist.default === 0)
|
||||
.sort((a: ThemePlaylist, b: ThemePlaylist) =>
|
||||
a.name > b.name ? 1 : -1,
|
||||
)
|
||||
.map((cardPlaylist: ThemePlaylist) => {
|
||||
return (
|
||||
<Group key={cardPlaylist.name} pos={'relative'}>
|
||||
{cardPlaylist.name === currentThemePlaylist && (
|
||||
<FiChevronRight
|
||||
style={{
|
||||
position: 'absolute',
|
||||
left: -14,
|
||||
zIndex: 10,
|
||||
fontSize: '2rem',
|
||||
fontWeight: 'bold',
|
||||
borderRadius: '50%',
|
||||
backgroundColor: 'var(--mantine-color-border-0)',
|
||||
color:
|
||||
theme.borderColor === theme.primaryColor
|
||||
? 'var(--mantine-color-accent-0)'
|
||||
: 'var(--mantine-color-primary-0)',
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<Box>
|
||||
<ThemePlaylistCard
|
||||
cardPlaylist={cardPlaylist}
|
||||
handleOpen={handleOpen}
|
||||
allThemes={allThemeData}
|
||||
/>
|
||||
</Box>
|
||||
</Group>
|
||||
);
|
||||
})}
|
||||
</SimpleGrid>
|
||||
) : (
|
||||
<Group w={'100%'} style={{ display: 'flex', justifyContent: 'center' }}>
|
||||
<NoItemsFound />
|
||||
|
||||
Reference in New Issue
Block a user