Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Notification System LocalStorage not defined #100

@birdup000

Description

@birdup000
 ⨯ ReferenceError: localStorage is not defined
    at localStorage (hooks/useNotificationVolume.ts:5:24)
    at useState (hooks/useNotificationVolume.ts:4:38)
    at useNotificationVolume (components/NotificationSystem.tsx:28:65)
    at useNotificationSystem (components/NotificationSystem.tsx:279:6)
  3 | export const useNotificationVolume = () => {
  4 |   const [volume, setVolume] = useState(() => {
> 5 |     const savedVolume = localStorage.getItem('notificationVolume');
    |                        ^
  6 |     return savedVolume ? Number(savedVolume) : 0.5;
  7 |   });
  8 | {
  digest: '3634359942'
}```

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions