diff --git a/src/components/Editor/AudioUploader/AudioUploader.tsx b/src/components/Editor/AudioUploader/AudioUploader.tsx index 904e9a53..bc2c7d9d 100644 --- a/src/components/Editor/AudioUploader/AudioUploader.tsx +++ b/src/components/Editor/AudioUploader/AudioUploader.tsx @@ -1,4 +1,4 @@ -// biome-ignore lint/style/useNodejsImportProtocol: +// biome-ignore lint/style/useNodejsImportProtocol: it works like this import { Buffer } from 'buffer' import { clsx } from 'clsx' diff --git a/src/pages/edit.page.tsx b/src/pages/edit.page.tsx index 6be7b88c..37d04496 100644 --- a/src/pages/edit.page.tsx +++ b/src/pages/edit.page.tsx @@ -47,24 +47,24 @@ export const EditPage = () => { onMount(() => { const shoutId = window.location.pathname.split('/').pop() const shoutIdFromUrl = Number.parseInt(shoutId ?? '0', 10) + console.debug(`editing shout ${shoutIdFromUrl}`) if (shoutIdFromUrl) setShoutId(shoutIdFromUrl) }) createEffect( - on( - [session, shout, shoutId], - async ([ses, sh, shid]) => { - if (ses?.user && !sh && shid) { - const { shout: loadedShout, error } = await apiClient.getMyShout(shid) - if (error) { - fail(error) - } else { - setShout(loadedShout) - } + on([session, shout, shoutId], async ([ses, sh, shid]) => { + console.debug(`editing session ${ses}`) + console.debug(`editing shout_id ${shid}`) + console.debug(`editing shout ${sh}`) + if (ses?.user && !sh && shid) { + const { shout: loadedShout, error } = await apiClient.getMyShout(shid) + if (error) { + fail(error) + } else { + setShout(loadedShout) } - }, - { defer: true }, - ), + } + }), ) const title = createMemo(() => {