import { translationAtom } from "@/atoms/translations-atom"; import { tileSizeAtom } from "@/atoms/user-settings-atom"; import { useAtom, useAtomValue } from "jotai"; import React from "react"; export function InputTileSize() { const [tileSize, setTileSize] = useAtom(tileSizeAtom); const t = useAtomValue(translationAtom); return (

{t("SETTINGS.CUSTOM_TILE_SIZE.TITLE")}


{t("SETTINGS.CUSTOM_TILE_SIZE.DESCRIPTION")}

{ if (e.currentTarget.value === "") { setTileSize(null); localStorage.removeItem("customWidth"); return; } setTileSize(parseInt(e.currentTarget.value)); }} placeholder="0 = Auto" className="input input-primary [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none" />
); }