Files
AI_Pharmacy_Frontend/make_search_wide.cjs
T
2026-09-02 18:23:05 +05:30

18 lines
778 B
JavaScript

const fs = require('fs');
const path = require('path');
const dir = './src/pages';
const files = fs.readdirSync(dir).filter(f => f.endsWith('.tsx'));
for (const file of files) {
const filePath = path.join(dir, file);
let content = fs.readFileSync(filePath, 'utf8');
// Make the search bar wide by removing the max width restriction and adding flex-1
content = content.replace(/className="relative w-full max-w-2xl group"/g, 'className="relative w-full flex-1 max-w-none group"');
// Also check if some of them were modified differently
content = content.replace(/className="relative w-full max-w-md group"/g, 'className="relative w-full flex-1 max-w-none group"');
fs.writeFileSync(filePath, content, 'utf8');
}
console.log('Made search bars full width.');