Skip to content

Commit

Permalink
feat(frontend): animate the application grid
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnisDa committed Dec 19, 2024
1 parent 270611e commit 4291913
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/frontend/app/components/common.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Carousel } from "@mantine/carousel";
import "@mantine/carousel/styles.css";
import { useAutoAnimate } from "@formkit/auto-animate/react";
import {
ActionIcon,
Alert,
Expand Down Expand Up @@ -104,14 +105,16 @@ export const ApplicationGrid = (props: {
children: ReactNode | Array<ReactNode>;
}) => {
const userPreferences = useUserPreferences();
const [parent] = useAutoAnimate();

return (
<SimpleGrid
spacing="lg"
ref={parent}
cols={match(userPreferences.general.gridPacking)
.with(GridPacking.Normal, () => ({ base: 2, sm: 3, md: 4, lg: 5 }))
.with(GridPacking.Dense, () => ({ base: 3, sm: 4, md: 5, lg: 6 }))
.exhaustive()}
spacing="lg"
>
{props.children}
</SimpleGrid>
Expand Down

0 comments on commit 4291913

Please sign in to comment.