-
- {hideEditActions ? (
-
- ) : (
-
- )}
-
+ useEffect(() => {
+ setLetterRenderErrorState(state.errorState);
+ }, [state, setLetterRenderErrorState]);
-
- {hideEditActions ? (
+ return (
+
}
+ rightColumn={
+
{loadingText}}
+ forcePolling={isPending}
+ >
- ) : (
- {loadingText}}
- forcePolling={isPending}
- >
-
-
- )}
-
-
+
+ }
+ />
);
}
-export function LetterRenderTab({
+function LetterRenderTabForm({
template,
tab,
- hideEditActions,
-}: LetterRenderTabProps) {
+}: {
+ template: AuthoringLetterTemplate;
+ tab: PersonalisedRenderKey;
+}) {
const personalisedRender = template.files[tab];
-
const formState = deriveFormState(template, personalisedRender);
const pdfUrl = derivePdfUrl(template, personalisedRender);
@@ -123,12 +135,36 @@ export function LetterRenderTab({
initialState={formState}
serverAction={updateLetterPreview}
>
-