berry-free-react-admin-template icon indicating copy to clipboard operation
berry-free-react-admin-template copied to clipboard

chore: avoid pass theme prop to the dom

Open pedrocarlos-ti opened this issue 2 years ago โ€ข 2 comments
trafficstars

Description

When the MainLayout render, the theme prop is passed to the DOM as [object Object] as you can see in the image below. It was changed the logic of the Main component -> shouldForwardProp to avoid pass the prop.

Screenshot

Screenshot 2023-09-16 at 13 19 58

  • [x] Remove UNUSED comment code
  • [x] Remove any logging like console.log
  • [x] Remove all warnings and errors while build
  • [x] Check vulnerabilities
  • [x] Make sure build for production is working. Try running command for prod build in local.
  • [x] Fix prettier: npx prettier --write .
  • [x] Fix eslint: npx eslint src\ --fix command
  • [x] Push package.lock only if you used npm, push yarn.lock only if you used yarn. NPM will udpate both lock file so make sure you dont push yarn.lock updated by NPM
  • [x] WCAG

General

  • [ ] Follow import structure. module/third-party/files/component/style/types/asset
  • [ ] Try to use theme for design like palette, typography, variant, components, etc. (don't use custom color code anyhow)
  • [ ] Before adding custom style follow our pre-built components/elements

pedrocarlos-ti avatar Sep 16 '23 12:09 pedrocarlos-ti

@CodiumAI-Agent /review

phoenixcoded20 avatar Dec 04 '23 06:12 phoenixcoded20

PR Analysis

  • ๐ŸŽฏ Main theme: Avoid passing theme prop to the DOM
  • ๐Ÿ“ PR summary: This PR addresses an issue where the 'theme' prop was being passed to the DOM as an object. The logic of the 'Main' component was changed to prevent this from happening.
  • ๐Ÿ“Œ Type of PR: Bug fix
  • ๐Ÿงช Relevant tests added: False
  • โฑ๏ธ Estimated effort to review [1-5]: 1, because the PR is small and the change is straightforward.
  • ๐Ÿ”’ Security concerns: No security concerns found

PR Feedback

How to use

Instructions

Tag me in a comment '@CodiumAI-Agent' and add one of the following commands: /review: Request a review of your Pull Request. /describe: Update the PR title and description based on the contents of the PR. /improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback. /ask <QUESTION>: Ask a question about the PR. /update_changelog: Update the changelog based on the PR's contents. /add_docs: Generate docstring for new components introduced in the PR. /generate_labels: Generate labels for the PR based on the PR's contents. see the tools guide for more details.

To edit any configuration parameter from the configuration.toml, add --config_path=new_value. For example: /review --pr_reviewer.extra_instructions="focus on the file: ..." To list the possible configuration parameters, add a /config comment.

CodiumAI-Agent avatar Dec 04 '23 06:12 CodiumAI-Agent