Skip to content

Commit 79cb2b4

Browse files
committed
fix: Temporarily logs
1 parent d0f9adc commit 79cb2b4

File tree

1 file changed

+16
-1
lines changed
  • src/schedule-and-details/introducing-section

1 file changed

+16
-1
lines changed

src/schedule-and-details/introducing-section/index.jsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,19 @@ const IntroducingSection = ({
7070
);
7171

7272
const [initialOverview] = React.useState(overview);
73+
console.log('[IntroducingSection] initialOverview (init):', initialOverview);
74+
7375
const [initialSidebar] = React.useState(aboutSidebarHtml);
7476

77+
React.useEffect(() => {
78+
console.log('[IntroducingSection] initialOverview on mount:', initialOverview);
79+
}, []);
80+
81+
React.useEffect(() => {
82+
console.log('[IntroducingSection] overview changed:', overview);
83+
console.log('[IntroducingSection] initialOverview vs overview equal?:', Object.is(initialOverview, overview));
84+
}, [overview, initialOverview]);
85+
7586
return (
7687
<section className="section-container introducing-section">
7788
{aboutPageEditable && (
@@ -116,7 +127,11 @@ const IntroducingSection = ({
116127
<WysiwygEditor
117128
initialValue={initialOverview}
118129
value={overview}
119-
onChange={(value) => onChange(value, 'overview')}
130+
onChange={(value) => {
131+
console.log('[IntroducingSection] Wysiwyg onChange value:', value);
132+
console.log('[IntroducingSection] (onChange) initialOverview snapshot stays:', initialOverview);
133+
onChange(value, 'overview');
134+
}}
120135
/>
121136
<Form.Control.Feedback>{overviewHelpText}</Form.Control.Feedback>
122137
</Form.Group>

0 commit comments

Comments
 (0)