From e9a48b45e1ee021d4018e8387704ae7eac13e3e5 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 11 Jan 2023 19:03:06 -0600 Subject: [PATCH] Remove redirect code from PublicLayout --- app/soapbox/features/public-layout/index.tsx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/soapbox/features/public-layout/index.tsx b/app/soapbox/features/public-layout/index.tsx index 3671b5ae8..0fdc8b946 100644 --- a/app/soapbox/features/public-layout/index.tsx +++ b/app/soapbox/features/public-layout/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Switch, Route, Redirect } from 'react-router-dom'; import LandingGradient from 'soapbox/components/landing-gradient'; -import { useAppSelector, useSoapboxConfig } from 'soapbox/hooks'; +import { useAppSelector } from 'soapbox/hooks'; import { isStandalone } from 'soapbox/utils/state'; import AboutPage from '../about'; @@ -13,9 +13,6 @@ import Header from './components/header'; const PublicLayout = () => { const standalone = useAppSelector((state) => isStandalone(state)); - const soapboxConfig = useSoapboxConfig(); - - const shouldRedirectFromRoot = soapboxConfig.redirectRootNoLogin && !soapboxConfig.redirectRootNoLogin.match(/^\/?$/); if (standalone) { return ; @@ -31,11 +28,7 @@ const PublicLayout = () => {
- {shouldRedirectFromRoot ? ( - - ) : ( - - )} +