import os
import re

replacements = [
    (r'1580466/pexels-photo-1580466', '30557705/pexels-photo-30557705'),
    (r'235615/pexels-photo-235615', '33516339/pexels-photo-33516339'),
    (r'974314/pexels-photo-974314', '38574684/pexels-photo-38574684'),
    (r'209148/pexels-photo-209148', '37214905/pexels-photo-37214905'),
    (r'1075960/pexels-photo-1075960', '16408959/pexels-photo-16408959'),
    (r'440731/pexels-photo-440731', '32370508/pexels-photo-32370508')
]

for root, dirs, files in os.walk('src/app'):
    for file in files:
        if file.endswith('.tsx') or file.endswith('.ts'):
            filepath = os.path.join(root, file)
            with open(filepath, 'r') as f:
                content = f.read()
            
            new_content = content
            for old, new in replacements:
                new_content = re.sub(old, new, new_content)
                
            if new_content != content:
                with open(filepath, 'w') as f:
                    f.write(new_content)
                print(f"Updated {filepath}")
