From 8aed5fd517505cfdf448ac4dc2859bbeb09dd281 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Wed, 6 Apr 2022 11:38:25 -0700 Subject: [PATCH] Propogate changes to the font size Because this is update in the page now, this needs to be reflected when changed in the component. --- .../web/components/templates/article/ArticleContainer.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/web/components/templates/article/ArticleContainer.tsx b/packages/web/components/templates/article/ArticleContainer.tsx index 2976227a9..b4efcb97d 100644 --- a/packages/web/components/templates/article/ArticleContainer.tsx +++ b/packages/web/components/templates/article/ArticleContainer.tsx @@ -41,6 +41,10 @@ export function ArticleContainer(props: ArticleContainerProps): JSX.Element { await userPersonalizationMutation({ fontSize: newFontSize }) } + useEffect(() => { + updateFontSize(props.fontSize ?? 20) + }, [props.fontSize]) + // Listen for font size and color mode change events sent from host apps (ios, macos...) useEffect(() => { const increaseFontSize = async () => {