Skip to content

Commit

Permalink
Fix type error in PostImage
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Feb 9, 2024
1 parent d382ae5 commit 4e6cac0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions apps/blog/src/components/PostImage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ import { classNames } from "@marshallku/utils";
import useZoom from "#hooks/useZoom";
import styles from "./index.module.scss";

export interface PostImageProps extends ImgHTMLAttributes<HTMLImageElement> {
src: string;
}

const IMAGE_SIZE = [480, 600, 860, 1180];

const cx = classNames(styles, "post-image");

function PostImage({ src, title, alt, width, height, ...rest }: PostImageProps) {
function PostImage({ src, title, alt, width, height, ...rest }: ImgHTMLAttributes<HTMLImageElement>) {
const imageRef = useRef<HTMLImageElement>(null);
const { attach, detach } = useZoom();

Expand Down

0 comments on commit 4e6cac0

Please sign in to comment.