import { useCustomWidthAtom } from "@/atoms/userSettingsAtom"; import { useAtom, useAtomValue } from "jotai"; type ImageScaleSelectProps = { scale: string; setScale: React.Dispatch>; hideInfo?: boolean; }; export function ImageScaleSelect({ scale, setScale, hideInfo, }: ImageScaleSelectProps) { const useCustomWidth = useAtomValue(useCustomWidthAtom); return (
{hideInfo ? ( <>

Image Scale ({scale}X)

{hideInfo && parseInt(scale) >= 6 && (

!

)} ) : (

IMAGE SCALE ({scale}X) {useCustomWidth && "DISABLED"}

)}
{!hideInfo && (

Anything above 4X (except 16X Double Upscayl) only resizes the image and does not use AI upscaling.

)} {!hideInfo && parseInt(scale) >= 6 && (

This may cause performance issues on some devices!

)} { setScale(e.target.value.toString()); }} step="1" className="range range-primary mt-2" disabled={useCustomWidth} />
); }