Standalone: don't memoize isStandalone
This commit is contained in:
parent
777c975693
commit
74e5ae077a
|
@ -4,7 +4,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { getSoapboxConfig } from'soapbox/actions/soapbox';
|
import { getSoapboxConfig } from'soapbox/actions/soapbox';
|
||||||
import { createSelector } from 'reselect';
|
|
||||||
import { isPrerendered } from 'soapbox/precheck';
|
import { isPrerendered } from 'soapbox/precheck';
|
||||||
import { isURL } from 'soapbox/utils/auth';
|
import { isURL } from 'soapbox/utils/auth';
|
||||||
import { BACKEND_URL } from 'soapbox/build_config';
|
import { BACKEND_URL } from 'soapbox/build_config';
|
||||||
|
@ -24,8 +23,7 @@ export const federationRestrictionsDisclosed = state => {
|
||||||
* @param {object} state
|
* @param {object} state
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
export const isStandalone = state => createSelector([
|
export const isStandalone = state => {
|
||||||
state => state.getIn(['meta', 'instance_fetch_failed'], false),
|
const instanceFetchFailed = state.getIn(['meta', 'instance_fetch_failed'], false);
|
||||||
], instanceFetchFailed => {
|
|
||||||
return isURL(BACKEND_URL) ? false : (!isPrerendered && instanceFetchFailed);
|
return isURL(BACKEND_URL) ? false : (!isPrerendered && instanceFetchFailed);
|
||||||
});
|
};
|
||||||
|
|
Loading…
Reference in New Issue