fix: migrate all hardcoded eyebrow labels and text to CMS to fix locale bleeding
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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')
|
||||
Reference in New Issue
Block a user