import { goto } from '$app/navigation'; /** * Resolve-callback factory for `use:enhance`. * * Follows `result.type === 'redirect'` automatically (actions like login, * billing portal, and logged-out pricing choose throw redirects), then hands * everything else to the optional handler — falling back to the default * `update()` when none is given. * * Usage: *