Skip to content

Commit

Permalink
fix: redirect user back to profile page after time preferences saved (#9
Browse files Browse the repository at this point in the history
)

---------

Co-authored-by: ZL Asica <[email protected]>
  • Loading branch information
WelldoneM and ZL-Asica authored Oct 17, 2024
1 parent 68ba805 commit 1b8099e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hooks/data/useTimePreferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const useTimePreferences = () => {
const savePreferences = async () => {
try {
await saveTimePreferences(userId, selectedTimes);
navigate(`/profile/${userId}`);
} catch (err) {
console.error('Failed to save time preferences');
}
Expand Down

0 comments on commit 1b8099e

Please sign in to comment.