mirror of
https://github.com/usenocturne/nocturne-ui.git
synced 2026-04-25 15:55:54 +03:00
[PR #81] [MERGED] Use default settings listed in settingsStructure instead of hardcoding default values #114
Labels
No labels
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nocturne-ui#114
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/usenocturne/nocturne-ui/pull/81
Author: @angelolz
Created: 1/23/2025
Status: ✅ Merged
Merged: 2/17/2025
Merged by: @brandonsaldan
Base:
main← Head:feature/fix-default-settings📝 Commits (5)
2fb617cuse settingStructure default value instead of hardcoding84e4e00fixed lyric gesture bug105ae10reorganized settings to put related ones together87240a5fix(pr): update wording to clarify what is being signed out of1c53475Merge branch 'main' into feature/fix-default-settings📊 Changes
7 files changed (+299 additions, -240 deletions)
View changed files
➕
src/components/settings/AccountInfo.jsx(+25 -0)📝
src/components/settings/Settings.jsx(+249 -227)📝
src/hooks/useElapsedTime.js(+7 -4)📝
src/hooks/useLyrics.js(+4 -2)📝
src/hooks/useNowPlaying.js(+9 -5)📝
src/hooks/useTrackScroll.js(+4 -2)📝
src/pages/now-playing.jsx(+1 -0)📄 Description
This PR updates the logic to use the defaultValue specified in the settingsStructure instead of hardcoding default values when a hook retrieves a setting from localStorage and encounters a null value.
I wasn't able to use the
settingsStructureobject directly as I would need to have a way to traverse to the right item and get itsdefaultValue. What I did instead is make agetDefaultSettingValuefunction so that retrieving it will look cleaner. I would like to know if you have a better way of handling this!🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.