Remove the repetitive use darkTitle prop and instead use the title prop to pass in a Typography component with the variant of "h3" to achieve the same effect. This simplifies the code and makes it more readable.
Updated code uses a ternary operator to check the value of darkTitle and conditionally render the title prop with or without the Typography component.
Commit Checklist
[x] Remove UNUSED comment code
[x] Remove any logging like console.log
[x] Remove all warnings and errors while build
[x] Make sure build for production is working. Try running command for prod build in local.
[] Fix prettier: npx prettier --write .
[] Fix eslint: npx eslint src\ --fix command
[] 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
Remove the repetitive use darkTitle prop and instead use the title prop to pass in a Typography component with the variant of "h3" to achieve the same effect. This simplifies the code and makes it more readable.
Updated code uses a ternary operator to check the value of darkTitle and conditionally render the title prop with or without the Typography component.
Commit Checklist
npx prettier --write .
npx eslint src\ --fix
commandGeneral