From 4596c2233cb9fba08ae5d1c01abc81f8c3cf4215 Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Sat, 31 Dec 2022 21:26:41 +0100 Subject: [PATCH] fix: Don't show the visual regression warning outside of CI --- theatre/studio/src/toolbars/GlobalToolbar.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/theatre/studio/src/toolbars/GlobalToolbar.tsx b/theatre/studio/src/toolbars/GlobalToolbar.tsx index 7c23b8b..7ba777e 100644 --- a/theatre/studio/src/toolbars/GlobalToolbar.tsx +++ b/theatre/studio/src/toolbars/GlobalToolbar.tsx @@ -135,13 +135,15 @@ const GlobalToolbar: React.FC = () => { const moreMenuTriggerRef = useRef(null) const showUpdatesBadge = useMemo(() => { - if (hasUpdates || window.__IS_VISUAL_REGRESSION_TESTING) { + if (window.__IS_VISUAL_REGRESSION_TESTING) { if (!showedVisualTestingWarning) { showedVisualTestingWarning = true console.warn( "Visual regression testing enabled, so we're showing the updates badge unconditionally", ) } + } + if (hasUpdates || window.__IS_VISUAL_REGRESSION_TESTING) { return true }