quivr/frontend/lib/context
Elazar Naaman c5157186e0
fix(frontend): Implement persistent dark mode setting and & Implement persistent dark mode setting (#2423)
# Description

Please include a summary of the changes and the related issue. Please
also include relevant motivation and context.

## Checklist before requesting a review

Please delete options that are not relevant.

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented hard-to-understand areas
- [x] I have ideally added tests that prove my fix is effective or that
my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged

## Screenshots (if appropriate):


<!--
ELLIPSIS_HIDDEN
-->


----

| <a href="https://ellipsis.dev" target="_blank"><img
src="https://avatars.githubusercontent.com/u/80834858?s=400&u=31e596315b0d8f7465b3ee670f25cea677299c96&v=4"
alt="Ellipsis" width="30px" height="30px"/></a> | 🚀 This PR
description was created by [Ellipsis](https://www.ellipsis.dev) for
commit bb45566f8a. |
|--------|--------|

### Summary:
This PR updates the `useLanguageHook` and `UserSettingsProvider`
functions to use the `shortName` of the selected language when changing
the language and to retrieve and store the dark mode setting from and to
local storage, respectively.

**Key points**:
- Updated `useLanguageHook` in
`/frontend/app/user/components/LanguageSelect/hooks/useLanguageHook.ts`
to use `shortName` of selected language when changing language.
- Updated `UserSettingsProvider` in
`/frontend/lib/context/UserSettingsProvider/User-settings.provider.tsx`
to retrieve dark mode setting from local storage.
- Updated listener for `change` event on `mediaQueryList` in
`UserSettingsProvider` to store updated dark mode setting in local
storage.


----
Generated with ❤️ by [ellipsis.dev](https://www.ellipsis.dev)



<!--
ELLIPSIS_HIDDEN
-->

---------

Co-authored-by: Zewed <dewez.antoine2@gmail.com>
2024-05-14 09:30:24 +02:00
..
BrainProvider feat(frontend): onboarding V2 (#2394) 2024-04-09 18:06:33 +02:00
ChatProvider feat(frontend): citations & sources (#2523) 2024-05-01 05:26:09 -07:00
ChatsProvider feat: add chat view new design (#1897) 2023-12-14 16:22:09 +01:00
KnowledgeToFeedProvider feat: improve app ux (#1281) 2023-09-29 10:24:31 +02:00
MenuProvider feat(frontend): design menu (#2116) 2024-01-30 13:34:32 -08:00
OnboardingProvider feat(frontend): onboarding V2 (#2394) 2024-04-09 18:06:33 +02:00
SearchModalProvider feat(frontend): search modal - remove parameters and explore buttons (#2094) 2024-01-26 16:06:01 -08:00
SupabaseProvider Frontend/test/chat 1 (#508) 2023-07-05 09:30:22 +02:00
UserSettingsProvider fix(frontend): Implement persistent dark mode setting and & Implement persistent dark mode setting (#2423) 2024-05-14 09:30:24 +02:00
index.tsx fix(frontend): upgrade to plus button (#2324) 2024-03-08 16:31:12 -08:00