Skip to content

Refactor/change theme atom jotai - #113

Merged
jv-ramos merged 2 commits into
developfrom
refactor/change-theme-atom-jotai
Aug 13, 2025
Merged

Refactor/change theme atom jotai#113
jv-ramos merged 2 commits into
developfrom
refactor/change-theme-atom-jotai

Conversation

@cleytonjesus07

Copy link
Copy Markdown
Contributor

Refatorando o "theme.atom.js" removendo redundâncias.

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the theme management system by migrating from React Context to Jotai atoms, removing redundant code and simplifying state management. The changes also include minor UI text corrections and styling improvements.

  • Replaced React Context-based theme management with Jotai atoms for better performance and simpler state management
  • Updated UI text labels for better clarity (Login/Register page headings)
  • Made minor styling improvements including cursor pointer addition and aria-label updates

Reviewed Changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
frontend/src/context/atoms/themeApp.atoms.jsx New Jotai atoms for theme management with localStorage integration
frontend/src/context/ThemeContext.jsx Removed entire React Context implementation
frontend/src/main.jsx Removed ThemeProvider wrapper from app root
frontend/src/components/Logo/index.jsx Updated to use Jotai theme atom instead of Context
frontend/src/components/Layout/DropdownMenu/DropdownMenuNav/SwitchTheme/index.jsx Migrated from useTheme hook to Jotai atoms
frontend/src/components/forms/LoginForm.jsx Restructured form layout and updated link text
frontend/src/pages/Login/index.jsx Changed heading text from "Crie a sua conta" to "Acesse sua conta"
frontend/src/pages/Register/index.jsx Changed heading text from "Cadastre a sua conta" to "Crie a sua conta"
frontend/src/pages/Groups/GroupDetails/GroupSettings/index.jsx Added cursor-pointer class to button
frontend/src/App.jsx Removed empty className attribute
frontend/package.json Added jotai dependency

Comment thread frontend/src/context/atoms/themeApp.atoms.jsx
Comment thread frontend/src/context/atoms/themeApp.atoms.jsx
Comment thread frontend/src/components/forms/LoginForm.jsx
@jv-ramos
jv-ramos merged commit 2a06c03 into develop Aug 13, 2025
1 check passed
@Alan-oliveir
Alan-oliveir deleted the refactor/change-theme-atom-jotai branch August 13, 2025 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants