Use Prettier for ESLint formatting TypeScript (#23631)
This commit is contained in:
parent
6aeb162927
commit
51b83ed195
31 changed files with 407 additions and 245 deletions
|
@ -8,7 +8,7 @@ type Props = {
|
|||
width: number;
|
||||
height: number;
|
||||
onClick?: () => void;
|
||||
}
|
||||
};
|
||||
|
||||
export const GIFV: React.FC<Props> = ({
|
||||
src,
|
||||
|
@ -17,19 +17,23 @@ export const GIFV: React.FC<Props> = ({
|
|||
width,
|
||||
height,
|
||||
onClick,
|
||||
})=> {
|
||||
}) => {
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
const handleLoadedData: React.ReactEventHandler<HTMLVideoElement> = useCallback(() => {
|
||||
setLoading(false);
|
||||
}, [setLoading]);
|
||||
const handleLoadedData: React.ReactEventHandler<HTMLVideoElement> =
|
||||
useCallback(() => {
|
||||
setLoading(false);
|
||||
}, [setLoading]);
|
||||
|
||||
const handleClick: React.MouseEventHandler = useCallback((e) => {
|
||||
if (onClick) {
|
||||
e.stopPropagation();
|
||||
onClick();
|
||||
}
|
||||
}, [onClick]);
|
||||
const handleClick: React.MouseEventHandler = useCallback(
|
||||
(e) => {
|
||||
if (onClick) {
|
||||
e.stopPropagation();
|
||||
onClick();
|
||||
}
|
||||
},
|
||||
[onClick]
|
||||
);
|
||||
|
||||
return (
|
||||
<div className='gifv' style={{ position: 'relative' }}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue