Remove console.log. Remove vestigial property (#5217)

This commit is contained in:
WithoutPants 2024-09-05 09:35:56 +10:00 committed by GitHub
parent ad442fbee5
commit 1dac598755
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,15 +18,13 @@ import { GalleryPreviewScrubber } from "./GalleryPreviewScrubber";
import cx from "classnames";
import { useHistory } from "react-router-dom";
interface IScenePreviewProps {
isPortrait?: boolean;
interface IGalleryPreviewProps {
gallery: GQL.SlimGalleryDataFragment;
onScrubberClick?: (index: number) => void;
}
export const GalleryPreview: React.FC<IScenePreviewProps> = ({
export const GalleryPreview: React.FC<IGalleryPreviewProps> = ({
gallery,
isPortrait = false,
onScrubberClick,
}) => {
const [imgSrc, setImgSrc] = useState<string | undefined>(
@ -34,7 +32,7 @@ export const GalleryPreview: React.FC<IScenePreviewProps> = ({
);
return (
<div className={cx("gallery-card-cover", { portrait: isPortrait })}>
<div className={cx("gallery-card-cover")}>
{!!imgSrc && (
<img
loading="lazy"
@ -212,7 +210,6 @@ export const GalleryCard: React.FC<IProps> = (props) => {
<GalleryPreview
gallery={props.gallery}
onScrubberClick={(i) => {
console.log(i);
history.push(`/galleries/${props.gallery.id}/images/${i}`);
}}
/>