import React, { useCallback, useState } from "react"; import { ReactCompareSlider } from "react-compare-slider"; import useTranslation from "../hooks/use-translation"; const SliderView = ({ sanitizedImagePath, sanitizedUpscaledImagePath, zoomAmount, }: { sanitizedImagePath: string; sanitizedUpscaledImagePath: string; zoomAmount: string; }) => { const t = useTranslation(); const [backgroundPosition, setBackgroundPosition] = useState("0% 0%"); const handleMouseMove = useCallback((e: any) => { const { left, top, width, height } = e.target.getBoundingClientRect(); const x = ((e.pageX - left) / width) * 100; const y = ((e.pageY - top) / height) * 100; setBackgroundPosition(`${x}% ${y}%`); }, []); return (

{t("APP.SLIDER.ORIGINAL_TITLE")}

{t("APP.SLIDER.ORIGINAL_TITLE")} } itemTwo={ <>

{t("APP.SLIDER.UPSCAYLED_TITLE")}

{t("APP.SLIDER.UPSCAYLED_TITLE")} } className="group h-screen" /> ); }; export default SliderView;