mirror of
https://github.com/qwertyforce/scenery.git
synced 2025-05-02 13:39:40 +00:00
Update Photo.tsx
This commit is contained in:
parent
2e54d3b788
commit
3cdfba7950
@ -3,7 +3,7 @@
|
|||||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import Link from './Link'
|
||||||
const imgWithClick = { cursor: 'pointer' };
|
const imgWithClick = { cursor: 'pointer' };
|
||||||
|
|
||||||
const Photo = ({ index, onClick, photo, margin, direction, top, left, key }:{ index:any, onClick:any, photo:any, margin:any, direction:any, top:any, left:any, key:any }) => {
|
const Photo = ({ index, onClick, photo, margin, direction, top, left, key }:{ index:any, onClick:any, photo:any, margin:any, direction:any, top:any, left:any, key:any }) => {
|
||||||
@ -19,13 +19,13 @@ const Photo = ({ index, onClick, photo, margin, direction, top, left, key }:{ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<a key={key} href={key}>
|
<Link key={key} href={key}>
|
||||||
<img
|
<img
|
||||||
style={onClick ? { ...imgStyle, ...imgWithClick } : imgStyle}
|
style={onClick ? { ...imgStyle, ...imgWithClick } : imgStyle}
|
||||||
{...photo}
|
{...photo}
|
||||||
onClick={onClick ? handleClick : null}
|
onClick={onClick ? handleClick : null}
|
||||||
/>
|
/>
|
||||||
</a>
|
</Link>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user