Update card.tsx - #5415
Update card.tsx#5415MaddipatlaChetan24 wants to merge 2 commits into
Conversation
|
can you please check this !! |
dyesin
left a comment
There was a problem hiding this comment.
Strip the unrelated formatting noise, keep only the hoist.
dyesin
left a comment
There was a problem hiding this comment.
strip the unrelated formatting noise, keep only the hoist.
|
Thanks for the PR. Before we review it, please note that "check this" isn't a submission we can accept. It hands the verification work to maintainers, and our review time is limited. We welcome AI-assisted contributions, but you are the author and must stand behind every line. Before requesting review, please: Run it. Set up the dev environment, run the full test suite, and confirm the change works as intended. Once you can confirm all of the above in the PR description, we're happy to take a look. Until then, we'll mark this as a draft. |
Fixes #1, Fixes #2
Description
Hoists the
levelsarray (['', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']) out ofthe
SemanticTitlecomponent inCardinto a module-level constant(
HEADING_LEVELS). Previously this array literal was re-allocated on everyrender of
SemanticTitle, which runs for everyCardwith atitleandre-runs on every re-render. The array's contents never change, so it only
needs to be allocated once at module load. No change to rendered output or
component behavior.
Scope
Patch: Bug Fix