fix(web): zwei tsc-Buildfehler (useMutation-Rueckgabe void, Uint8Array<ArrayBuffer>)
Some checks failed
CI / Backend Tests (.NET) (push) Successful in 1m18s
CI / Frontend Tests (Node/Vite) (push) Successful in 9m35s
CI / Docker Build & Push (push) Successful in 1m46s
CI / Deploy auf TrueNAS (Custom App) (push) Failing after 4s

Blockierten den CI-Frontend-Build (npm run build) und damit build-and-push.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-19 09:47:03 +02:00
parent 45673bb066
commit 60214a7c92
2 changed files with 4 additions and 3 deletions

View File

@@ -32,14 +32,15 @@ export default function GerbilAcquisitionSection({ gerbilId }: { gerbilId: strin
const [note, setNote] = useState('') const [note, setNote] = useState('')
const [error, setError] = useState<string | null>(null) const [error, setError] = useState<string | null>(null)
const save = useMutation((id: string | '') => { const save = useMutation(async (id: string | '') => {
const body = { const body = {
gerbilId, gerbilId,
date: date || null, date: date || null,
price: price.trim() === '' ? null : Number(price), price: price.trim() === '' ? null : Number(price),
note: note.trim() || null, note: note.trim() || null,
} }
return id === '' ? createAcquisition(body) : updateAcquisition(id, body) if (id === '') await createAcquisition(body)
else await updateAcquisition(id, body)
}) })
const removal = useMutation((id: string) => deleteAcquisition(id)) const removal = useMutation((id: string) => deleteAcquisition(id))

View File

@@ -25,7 +25,7 @@ export async function fetchPushConfig(): Promise<{ enabled: boolean; publicKey:
} }
} }
function urlBase64ToUint8Array(base64: string): Uint8Array { function urlBase64ToUint8Array(base64: string): Uint8Array<ArrayBuffer> {
const padding = '='.repeat((4 - (base64.length % 4)) % 4) const padding = '='.repeat((4 - (base64.length % 4)) % 4)
const b64 = (base64 + padding).replace(/-/g, '+').replace(/_/g, '/') const b64 = (base64 + padding).replace(/-/g, '+').replace(/_/g, '/')
const raw = atob(b64) const raw = atob(b64)