diff --git a/apps/web/src/pages/AdminSettingsPage.tsx b/apps/web/src/pages/AdminSettingsPage.tsx index 36ad39e..53cf5c9 100644 --- a/apps/web/src/pages/AdminSettingsPage.tsx +++ b/apps/web/src/pages/AdminSettingsPage.tsx @@ -274,7 +274,12 @@ function LandingSettingsForm({ settings }: { settings: InstanceSettings }): Reac
void onSubmit(event)} noValidate> - + @@ -325,8 +330,8 @@ function LegalSettingsForm({ settings }: { settings: InstanceSettings }): React. void onSubmit(event)} noValidate> - - + + @@ -335,20 +340,27 @@ function LegalSettingsForm({ settings }: { settings: InstanceSettings }): React. ); } -/** One Markdown textarea with a toggleable rendered preview. */ -function LegalTextField({ +/** + * One Markdown textarea with a toggleable rendered preview. `wrapperClass` + * distinguishes instances on the page: the legal editors keep `legal-editor` + * (the legal e2e selects them by that class and index), the landing editor + * gets its own so it does not shift those indices. + */ +function MarkdownTextField({ label, value, onChange, + wrapperClass = 'legal-editor', }: { label: string; value: string; onChange: (value: string) => void; + wrapperClass?: string; }): React.JSX.Element { const { t } = useTranslation('legal'); const [preview, setPreview] = useState(false); return ( -
+