Gives the profile page's settings the toggle for notification and chat sounds.

Functions

f
useSoundsEnabled(): [boolean, (enabled: boolean) => void]

Returns whether sounds are on in this browser, and a setter that stores the choice. playChime reads the stored value each time it plays, so the choice applies at once without this hook, and another mounted copy of it isn't updated.

Usage

import * as mod from "src/hooks/shared/useSoundsEnabled.ts";