17 lines
601 B
Python
17 lines
601 B
Python
import re
|
|
import os
|
|
|
|
def insert_prop(filepath, prop_name):
|
|
with open(filepath, 'r') as f:
|
|
content = f.read()
|
|
|
|
# Find the interface declaration and insert `eyebrow?: string | null`
|
|
content = re.sub(r'(export interface \w+Props \{)', r'\1\n eyebrow?: string | null', content)
|
|
|
|
with open(filepath, 'w') as f:
|
|
f.write(content)
|
|
|
|
insert_prop('src/blocks/Eligibility/Component.tsx', 'eyebrow?: string | null')
|
|
insert_prop('src/blocks/ServicesDetailed/Component.tsx', 'eyebrow?: string | null')
|
|
insert_prop('src/blocks/Stats/Component.tsx', 'eyebrow?: string | null')
|