interface UseSettingsResult

Returned by useSettings to whatever reads or changes settings.

Properties

The settings, or null when signed out or before AuthProvider has read them from the server.

updateSettings: (patch: UpdateSettingsRequest) => Promise<void>

Applies patch at once, then saves it with PATCH /api/me/settings. A refusal puts the previous settings back and throws.

Usage

import { type UseSettingsResult } from "src/hooks/auth/useSettings.ts";