Skip to content

Commit 0428828

Browse files
frano-mclaude
andcommitted
refactor: use JSX syntax for RAS component in config (#4674)
Convert announcements config to .tsx and use proper JSX element syntax instead of invoking the component as a function, which is an anti-pattern that breaks if hooks are added later. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent bedc015 commit 0428828

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

site-config/anvil-cmg/dev/announcements/announcements.ts renamed to site-config/anvil-cmg/dev/announcements/announcements.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ import { RAS } from "../../../../app/components/anvil/banner/RAS/ras";
88
export const announcements: ComponentsConfig = [
99
{
1010
component: C.Announcements,
11-
props: { generalAnnouncement: RAS() },
11+
props: { generalAnnouncement: <RAS /> },
1212
} as ComponentConfig<typeof C.Announcements>,
1313
];

0 commit comments

Comments
 (0)