Files
movie-advisor/components/Poster/components/Handlers/index.tsx
T
2024-10-19 16:09:15 +03:00

25 lines
469 B
TypeScript

'use client';
import { FC } from 'react';
import { useMutateShowState } from '@/hooks/useShowState';
interface Props {
show: Show;
onClick?: () => void;
}
const Handlers: FC<Props> = ({ onClick, show }) => {
const { mutate } = useMutateShowState(show);
return (
<div
onClick={onClick}
onDoubleClick={() => mutate({ list: 'favorite', value: true })}
className='absolute left-0 top-0 size-full'
/>
);
};
export default Handlers;