import { useEffect, useState } from 'react'; import { authFetch } from './auth'; /** * Resolve a same-origin `/api/files/*` path into a blob object URL that was fetched * WITH the `Authorization: Bearer ` header. * * Why this exists: `/api/files/*` requires auth (it used to be an unauthenticated GET * but was closed off in the "leaky endpoints" hardening). Native ``/`