import { lensSizeAtom, viewTypeAtom } from "@/atoms/userSettingsAtom"; import SidebarClosed from "@/components/icons/SidebarClosed"; import SidebarOpened from "@/components/icons/SidebarOpened"; import { useAtom } from "jotai"; import React, { useEffect, useState } from "react"; const ImageOptions = ({ zoomAmount, setZoomAmount, resetImagePaths, hideZoomOptions, }: { zoomAmount: string; setZoomAmount: (arg: any) => void; resetImagePaths: () => void; hideZoomOptions?: boolean; }) => { const [openSidebar, setOpenSidebar] = useState(false); const [viewType, setViewType] = useAtom(viewTypeAtom); const [lensSize, setLensSize] = useAtom(lensSizeAtom); useEffect(() => { if (!localStorage.getItem("zoomAmount")) { localStorage.setItem("zoomAmount", zoomAmount); } else { setZoomAmount(localStorage.getItem("zoomAmount")); } }, []); return (
Zoom Amount ({zoomAmount}%)
{ setZoomAmount(e.target.value); localStorage.setItem("zoomAmount", e.target.value); }} />Lens Size ({lensSize / 10})
{ setLensSize(parseInt(e.target.value)); }} />