diff --git a/src/hooks/useSubscription.js b/src/hooks/useSubscription.js
index 34ebc9b..88474e7 100644
--- a/src/hooks/useSubscription.js
+++ b/src/hooks/useSubscription.js
@@ -8,7 +8,7 @@ const LS_KEY = "quickpdf_usage";
const USERS = "users";
function getLocalUsage() {
- const n = parseInt(localStorage.getItem(LS_KEY), 10);
+ const n = parseInt(localStorage.getItem(LS_KEY, 10), 10);
return isNaN(n) ? 0 : n;
}
diff --git a/src/pages/Home/components/VisitorBadge.jsx b/src/pages/Home/components/VisitorBadge.jsx
index f36dee6..474f6f3 100644
--- a/src/pages/Home/components/VisitorBadge.jsx
+++ b/src/pages/Home/components/VisitorBadge.jsx
@@ -70,7 +70,7 @@ function OdometerDisplay({ value }) {
,
) : (
-
+
)
)}
diff --git a/src/pages/PageNumbers/PageNumbers.jsx b/src/pages/PageNumbers/PageNumbers.jsx
index 601b7ea..f5cc413 100644
--- a/src/pages/PageNumbers/PageNumbers.jsx
+++ b/src/pages/PageNumbers/PageNumbers.jsx
@@ -157,7 +157,7 @@ export function PageNumbers() {
- {POSITIONS.map(({ value, label }) => (
+ {(POSITIONS ?? []).map(({ value, label }) => (
diff --git a/src/pages/Split/Split.jsx b/src/pages/Split/Split.jsx
index 0df4eac..b437a9a 100644
--- a/src/pages/Split/Split.jsx
+++ b/src/pages/Split/Split.jsx
@@ -56,7 +56,7 @@ export function Split() {
try {
setIsProcessing(true);
setError(null);
- const splitBlob = await splitPdf(file, parseInt(range.start), parseInt(range.end));
+ const splitBlob = await splitPdf(file, parseInt(range.start, 10), parseInt(range.end, 10));
const url = URL.createObjectURL(splitBlob);
const link = document.createElement("a");
link.href = url;
diff --git a/src/pages/Watermark/Watermark.jsx b/src/pages/Watermark/Watermark.jsx
index 22574e5..35979f3 100644
--- a/src/pages/Watermark/Watermark.jsx
+++ b/src/pages/Watermark/Watermark.jsx
@@ -258,7 +258,7 @@ export function Watermark() {
{watermarkMode === "text" && (
- updateOption("fontSize", parseInt(e.target.value))} className="w-full h-1.5 bg-zinc-800 rounded-lg appearance-none cursor-pointer accent-white" />
+ updateOption("fontSize", parseInt(e.target.value, 10))} className="w-full h-1.5 bg-zinc-800 rounded-lg appearance-none cursor-pointer accent-white" />
)}
{watermarkMode === "image" && (
@@ -278,7 +278,7 @@ export function Watermark() {
- updateOption("rotation", parseInt(e.target.value))} className="w-full h-1.5 bg-zinc-800 rounded-lg appearance-none cursor-pointer accent-white" />
+ updateOption("rotation", parseInt(e.target.value, 10))} className="w-full h-1.5 bg-zinc-800 rounded-lg appearance-none cursor-pointer accent-white" />
@@ -287,7 +287,7 @@ export function Watermark() {
updateOption("offsetX", parseInt(e.target.value) || 0)}
+ onChange={(e) => updateOption("offsetX", parseInt(e.target.value, 10) || 0)}
className="w-full h-10 px-3 bg-black border border-white/10 text-white rounded-lg outline-none focus:ring-1 focus:ring-white/20"
/>
@@ -296,7 +296,7 @@ export function Watermark() {
updateOption("offsetY", parseInt(e.target.value) || 0)}
+ onChange={(e) => updateOption("offsetY", parseInt(e.target.value, 10) || 0)}
className="w-full h-10 px-3 bg-black border border-white/10 text-white rounded-lg outline-none focus:ring-1 focus:ring-white/20"
/>