Closed gozineb closed 1 year ago
🤖
Hello,
Thank you for your suggestion to improve the user experience by adding the language and light preferences to the user page. This is indeed a great idea and can be implemented using the existing LanguageDropDown
and DarkModeToggle
components.
Here is a simple example of how you can add these components to your user page:
import { LanguageDropDown } from "@/lib/components/NavBar/components/NavItems/components/LanguageDropDown/LanguageDropDown";
import { DarkModeToggle } from "@/lib/components/NavBar/components/NavItems/components/DarkModeToggle/DarkModeToggle";
export const UserPage = (): JSX.Element => {
return (
<>
<h1>User Page</h1>
<LanguageDropDown />
<DarkModeToggle />
</>
);
};
Please note that this is a simplified example and you might need to adjust it according to your actual project structure and requirements.
As for the current structure of the user page in the Quivr codebase, it is a functional component that uses several hooks and returns a JSX.Element. If the session is null, it redirects to the login page. The returned JSX.Element is a main element with two sections. The first section contains a div that either displays user statistics (if userStats is not null) or a spinner with a fetching message (if userStats is null).
Unfortunately, I couldn't find the current version of the Quivr codebase where this change is to be implemented. Could you please provide more information about this?
Thank you for your contribution to improving Quivr. If you have any other suggestions or need further assistance, feel free to ask.
Best regards, Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
Do not close until validated @matthieujacq
Epic
1231
Functional
Remove the two buttons from the navbar: The Language and the light preferences. Move them to the user's page.
Schema
Tech
Tests
Validation Checks