fix(web): zwei tsc-Buildfehler (useMutation-Rueckgabe void, Uint8Array<ArrayBuffer>)
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:
@@ -32,14 +32,15 @@ export default function GerbilAcquisitionSection({ gerbilId }: { gerbilId: strin
|
||||
const [note, setNote] = useState('')
|
||||
const [error, setError] = useState<string | null>(null)
|
||||
|
||||
const save = useMutation((id: string | '') => {
|
||||
const save = useMutation(async (id: string | '') => {
|
||||
const body = {
|
||||
gerbilId,
|
||||
date: date || null,
|
||||
price: price.trim() === '' ? null : Number(price),
|
||||
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))
|
||||
|
||||
|
||||
@@ -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 b64 = (base64 + padding).replace(/-/g, '+').replace(/_/g, '/')
|
||||
const raw = atob(b64)
|
||||
|
||||
Reference in New Issue
Block a user