diff --git a/package-lock.json b/package-lock.json index 4213503..5e3919b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "1.2.0", "dependencies": { "@gfazioli/mantine-border-animate": "^3.0.2", + "@gfazioli/mantine-parallax": "^4.0.10", "@gfazioli/mantine-text-animate": "^4.0.10", "@hello-pangea/dnd": "^18.0.1", "@mantine/core": "^9.6.2", @@ -185,6 +186,18 @@ "react-dom": "^18.x || ^19.x" } }, + "node_modules/@gfazioli/mantine-parallax": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@gfazioli/mantine-parallax/-/mantine-parallax-4.0.10.tgz", + "integrity": "sha512-EeSvOe2gywHry1vXUJ/ylnAyxHEUnYeGZDeiP/D0Kv+wY76TiQ3vvllUZRFTafg6d5fcu//VTwhqiN0FOjqT/A==", + "license": "MIT", + "peerDependencies": { + "@mantine/core": ">=9.0.0", + "@mantine/hooks": ">=9.0.0", + "react": "^18.x || ^19.x", + "react-dom": "^18.x || ^19.x" + } + }, "node_modules/@gfazioli/mantine-text-animate": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/@gfazioli/mantine-text-animate/-/mantine-text-animate-4.0.10.tgz", diff --git a/package.json b/package.json index 1492b2a..4cbc6f1 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "@gfazioli/mantine-border-animate": "^3.0.2", + "@gfazioli/mantine-parallax": "^4.0.10", "@gfazioli/mantine-text-animate": "^4.0.10", "@hello-pangea/dnd": "^18.0.1", "@mantine/core": "^9.6.2", diff --git a/src/App.tsx b/src/App.tsx index d7ea31e..2103f7e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -22,7 +22,7 @@ import '@mantine/dates/styles.css'; import '@mantine/notifications/styles.css'; import 'react-fontpicker-ts/dist/index.css'; import '@gfazioli/mantine-border-animate/styles.css'; - +import '@gfazioli/mantine-parallax/styles.css'; import '@gfazioli/mantine-text-animate/styles.css'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; import { Homepage, Settings } from 'pages'; diff --git a/src/components/DataTable/DataTable.tsx b/src/components/DataTable/DataTable.tsx index 9a53984..f9996da 100644 --- a/src/components/DataTable/DataTable.tsx +++ b/src/components/DataTable/DataTable.tsx @@ -23,17 +23,6 @@ export function DataTable({ globalFilter: string | number; isRefreshing?: boolean; }) { - const [scrollParent, setScrollParent] = useState(null); - - const virtualizer = useVirtualizer({ - count: data.length, - getScrollElement: () => scrollParent, - estimateSize: () => 30, - overscan: 5, - }); - - const virtualItems = virtualizer.getVirtualItems(); - const table = useTable({ features, data: data, @@ -46,6 +35,18 @@ export function DataTable({ globalFilter: globalFilter, }, }); + + const [scrollParent, setScrollParent] = useState(null); + + const virtualizer = useVirtualizer({ + count: table.getFilteredRowModel().rows.length, + getScrollElement: () => scrollParent, + estimateSize: () => 30, + overscan: 5, + }); + + const virtualItems = virtualizer.getVirtualItems(); + const { rows } = table.getRowModel(); return ( @@ -56,8 +57,8 @@ export function DataTable({ @@ -240,9 +242,7 @@ export function DataTable({ ? 'var(--mantine-color-accent-0)' : 'transparent', position: 'absolute', - bottom: isRefreshing ? 0 : -40, - paddingBottom: 6, - paddingTop: 6, + bottom: isRefreshing ? 0 : -32, transition: 'all 1.5s ease-in-out', placeContent: 'center', display: 'flex', diff --git a/src/pages/settings/components/Search/SearchHistory.tsx b/src/pages/settings/components/Search/SearchHistory.tsx index 230c7bd..90d6347 100644 --- a/src/pages/settings/components/Search/SearchHistory.tsx +++ b/src/pages/settings/components/Search/SearchHistory.tsx @@ -93,7 +93,7 @@ export function SearchHistory() { align='center' > - + void; openThemeModal: () => void; enabled?: boolean; + management?: boolean; }) { + console.log(cardTheme); const { hovered, ref: hoverRef } = useHover(); const [modalOpened, { open: openModal, close: closeModal }] = useDisclosure(false); const { currentTheme, setCurrentTheme, setCurrentThemePlaylist, handleDelete } = @@ -84,43 +87,45 @@ export function ThemeCard({ > {cardTheme.name} - - - + {management && ( + + + + )}