Fix real Biome bugs: inner declarations, dup keys, assign-in-expr, implicit any, cookie, a11y svg/keyboard, json
Local Build and Deploy / deploy (push) Successful in 51s
Local Build and Deploy / deploy (push) Successful in 51s
This commit is contained in:
1 parent
8d5c8ec96f
commit
59b63d6e70
19 files changed
+76
-44
No files matched your search
@@ -48,7 +48,9 @@ export default async function AdminHousekeeping({
|
||||
.split(",")
|
||||
.map((i) => Number(i.trim()))
|
||||
.filter((i) => !Number.isNaN(i));
|
||||
importIds.forEach((id) => selectedIds.add(id));
|
||||
importIds.forEach((id) => {
|
||||
selectedIds.add(id);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ export function PollForm({ defaultValues }: PollFormProps) {
|
||||
// biome-ignore lint/suspicious/noExplicitAny: explicitly chosen here, see surrounding code
|
||||
function onSubmit(data: any) {
|
||||
if (isEditing) {
|
||||
run(() => updatePoll({ id: defaultValues?.id!, ...data }), {
|
||||
run(() => updatePoll({ id: defaultValues!.id, ...data }), {
|
||||
successMessage: "Poll updated!",
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -78,7 +78,7 @@ export default async function AdminRadioApiKeysPage() {
|
||||
<Link href="/admin/radio/autodj">{t("autoDj")}</Link> ·{" "}
|
||||
<Link href="/admin/radio/embed">{t("embed")}</Link> ·{" "}
|
||||
<Link href="/admin/radio/points">{t("points")}</Link> ·{" "}
|
||||
<Link href="/admin/radio/monitoring">{t("monitoring")}</Link>
|
||||
<Link href="/admin/radio/monitoring">{t("monitoring.title")}</Link>
|
||||
</nav>
|
||||
|
||||
<section className="mt-6">
|
||||
|
||||
@@ -137,7 +137,7 @@ export default async function AdminRadioAutoDjPage() {
|
||||
htmlFor="new_title"
|
||||
style={{ display: "block", fontWeight: 700 }}
|
||||
>
|
||||
{t("autoDjForm.title")}
|
||||
{t("autoDjForm.trackTitle")}
|
||||
</label>
|
||||
<input
|
||||
id="new_title"
|
||||
|
||||
@@ -9,11 +9,13 @@ import {
|
||||
captureOrder,
|
||||
creditsPerUnit,
|
||||
isPayPalConfigured,
|
||||
type CaptureResult,
|
||||
} from "@/lib/services/paypal";
|
||||
import {
|
||||
authorizeTopupCapture,
|
||||
claimTopupDelivery,
|
||||
TopupCaptureError,
|
||||
type AuthorizedTopup,
|
||||
} from "@/lib/services/paypal-topup";
|
||||
import { rcon } from "@/lib/services/rcon";
|
||||
import { sendCurrency } from "@/lib/services/send-currency";
|
||||
@@ -72,7 +74,7 @@ export async function POST(req: Request): Promise<Response> {
|
||||
|
||||
// The create endpoint records ownership before returning the approval URL.
|
||||
// Do not let a signed-in user submit somebody else's approved order id.
|
||||
let authorized;
|
||||
let authorized: AuthorizedTopup;
|
||||
try {
|
||||
authorized = await authorizeTopupCapture(
|
||||
userId,
|
||||
@@ -138,7 +140,7 @@ export async function POST(req: Request): Promise<Response> {
|
||||
}
|
||||
}
|
||||
|
||||
let result;
|
||||
let result: CaptureResult;
|
||||
try {
|
||||
result = await captureOrder(orderId);
|
||||
} catch (e) {
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import { useEffect } from "react";
|
||||
* stays), shows a friendly card, and offers a reset. The raw error is logged to
|
||||
* the console, never shown to the user.
|
||||
*/
|
||||
export default function Error({
|
||||
export default function ErrorPage({
|
||||
error,
|
||||
reset,
|
||||
}: {
|
||||
|
||||
+6
-2
@@ -205,7 +205,9 @@ summary,
|
||||
letter-spacing: 0.03em;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
|
||||
transition:
|
||||
color 0.15s ease-in-out,
|
||||
background-color 0.15s ease-in-out;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
.nav-item:hover {
|
||||
@@ -223,7 +225,9 @@ summary,
|
||||
.dropdown-item {
|
||||
@apply block py-2.5 px-4 text-sm font-semibold rounded-lg mx-1;
|
||||
color: var(--color-dropdown-text-readable, var(--color-text-readable));
|
||||
transition: background-color 0.1s ease-in-out, color 0.1s ease-in-out;
|
||||
transition:
|
||||
background-color 0.1s ease-in-out,
|
||||
color 0.1s ease-in-out;
|
||||
}
|
||||
.dropdown-item:hover {
|
||||
background-color: color-mix(in srgb, var(--color-primary) 12%, transparent);
|
||||
|
||||
@@ -117,11 +117,12 @@ export default async function HelpCategoryPage({
|
||||
/>
|
||||
) : null}
|
||||
|
||||
{/* content is author-supplied HTML — sanitised server-side. */}
|
||||
<div
|
||||
style={{ lineHeight: 1.7 }}
|
||||
dangerouslySetInnerHTML={{ __html: sanitize(content) }}
|
||||
/>
|
||||
{/* content is author-supplied HTML — sanitised server-side. */}
|
||||
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: sanitised article body */}
|
||||
<div
|
||||
style={{ lineHeight: 1.7 }}
|
||||
dangerouslySetInnerHTML={{ __html: sanitize(content) }}
|
||||
/>
|
||||
|
||||
{hasButton ? (
|
||||
<div style={{ clear: "both", marginTop: "1rem" }}>
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import Link from "next/link";
|
||||
import { redirect } from "next/navigation";
|
||||
import type { CSSProperties } from "react";
|
||||
import type { CSSProperties, ReactNode } from "react";
|
||||
import { claimReferral } from "@/actions/referral";
|
||||
import {
|
||||
ContentCard,
|
||||
@@ -70,7 +70,7 @@ export default async function MePage({
|
||||
|
||||
const { claimed, error } = await searchParams;
|
||||
|
||||
let content;
|
||||
let content: ReactNode;
|
||||
try {
|
||||
// --- Account + reward config -----------------------------------------
|
||||
const [user, imagerBase, neededRaw, amountRaw, currencyRaw] =
|
||||
|
||||
Reference in new issue
Block a user