mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-16 05:36:00 +02:00
large performance refactor
This commit is contained in:
@@ -42,7 +42,7 @@ const pageVariants: Variants = {
|
||||
initial: (custom: { isNext: boolean }) => ({ opacity: 0, x: custom.isNext ? 100 : -100 }),
|
||||
};
|
||||
|
||||
export function GridCarousel(props: GridCarouselProps) {
|
||||
function BaseGridCarousel(props: GridCarouselProps) {
|
||||
const { cards, hasNextPage, loadNextPage, onNextPage, onPrevPage, rowCount = 1, title } = props;
|
||||
const { ref, ...cq } = useContainerQuery({
|
||||
'2xl': 1024,
|
||||
@@ -192,6 +192,10 @@ export function GridCarousel(props: GridCarouselProps) {
|
||||
);
|
||||
}
|
||||
|
||||
export const GridCarousel = memo(BaseGridCarousel);
|
||||
|
||||
GridCarousel.displayName = 'GridCarousel';
|
||||
|
||||
function getCardsToShow(breakpoints: {
|
||||
isLargerThan2xl: boolean;
|
||||
isLargerThan3xl: boolean;
|
||||
|
||||
Reference in New Issue
Block a user