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