From 74e5ae077aa61ef4bd059f9cda1a20d044ec622f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 31 Aug 2021 10:10:06 -0700 Subject: [PATCH 1/2] Standalone: don't memoize isStandalone --- app/soapbox/utils/state.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/soapbox/utils/state.js b/app/soapbox/utils/state.js index 9c69e9043..1f855f20f 100644 --- a/app/soapbox/utils/state.js +++ b/app/soapbox/utils/state.js @@ -4,7 +4,6 @@ */ import { getSoapboxConfig } from'soapbox/actions/soapbox'; -import { createSelector } from 'reselect'; import { isPrerendered } from 'soapbox/precheck'; import { isURL } from 'soapbox/utils/auth'; import { BACKEND_URL } from 'soapbox/build_config'; @@ -24,8 +23,7 @@ export const federationRestrictionsDisclosed = state => { * @param {object} state * @returns {boolean} */ -export const isStandalone = state => createSelector([ - state => state.getIn(['meta', 'instance_fetch_failed'], false), -], instanceFetchFailed => { +export const isStandalone = state => { + const instanceFetchFailed = state.getIn(['meta', 'instance_fetch_failed'], false); return isURL(BACKEND_URL) ? false : (!isPrerendered && instanceFetchFailed); -}); +}; From aa068fc12369ec26533830fe8ba22633a580d2b6 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 31 Aug 2021 10:24:36 -0700 Subject: [PATCH 2/2] Standalone fix: update login snapshots (again) --- .../__snapshots__/login_page-test.js.snap | 128 +++++++++++++++++- 1 file changed, 126 insertions(+), 2 deletions(-) diff --git a/app/soapbox/features/auth_login/components/__tests__/__snapshots__/login_page-test.js.snap b/app/soapbox/features/auth_login/components/__tests__/__snapshots__/login_page-test.js.snap index 041b1741d..82586223c 100644 --- a/app/soapbox/features/auth_login/components/__tests__/__snapshots__/login_page-test.js.snap +++ b/app/soapbox/features/auth_login/components/__tests__/__snapshots__/login_page-test.js.snap @@ -1,5 +1,129 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[` renders correctly on load 1`] = `null`; +exports[` renders correctly on load 1`] = ` +
+
+
+
+ +
+
+ +
+

+ + Trouble logging in? + +

+
+
+
+ +
+
+`; -exports[` renders correctly on load 2`] = `null`; +exports[` renders correctly on load 2`] = ` +
+
+
+
+ +
+
+ +
+

+ + Trouble logging in? + +

+
+
+
+ +
+
+`;