17 lines
563 B
JavaScript
17 lines
563 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const dir = 'app/(onboarding)/onboarding';
|
|
const files = fs.readdirSync(dir).filter(f => f.endsWith('.tsx'));
|
|
|
|
for (const file of files) {
|
|
const filePath = path.join(dir, file);
|
|
let code = fs.readFileSync(filePath, 'utf8');
|
|
|
|
// Remove Object.assign(window, {...}) lines since these are now proper React imports
|
|
code = code.replace(/Object\.assign\(window,\s*\{[\s\S]*?\}\);/g, '');
|
|
|
|
fs.writeFileSync(filePath, code);
|
|
}
|
|
console.log("Removed global window assignments from child components.");
|