mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
fit cards code improvement (#4658)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useRef } from "react";
|
||||
import React from "react";
|
||||
import * as GQL from "src/core/generated-graphql";
|
||||
import { GalleryCard } from "./GalleryCard";
|
||||
import { useContainerDimensions } from "../Shared/GridCard/GridCard";
|
||||
@@ -16,8 +16,7 @@ export const GalleryCardGrid: React.FC<IGalleryCardGrid> = ({
|
||||
zoomIndex,
|
||||
onSelectChange,
|
||||
}) => {
|
||||
const componentRef = useRef<HTMLDivElement>(null);
|
||||
const { width } = useContainerDimensions(componentRef);
|
||||
const [componentRef, { width }] = useContainerDimensions();
|
||||
return (
|
||||
<div className="row justify-content-center" ref={componentRef}>
|
||||
{galleries.map((gallery) => (
|
||||
|
||||
Reference in New Issue
Block a user