diff --git a/src/features/ui/components/columns-area.tsx b/src/features/ui/components/columns-area.tsx deleted file mode 100644 index e64ee449f..000000000 --- a/src/features/ui/components/columns-area.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; - -import { Layout } from '../../../components/ui'; - -interface IColumnsArea { - layout: any; - children: React.ReactNode; -} - -const ColumnsArea: React.FC = (props) => { - const { children } = props; - const layout = props.layout || { LEFT: null, RIGHT: null }; - - return ( - - - {layout.LEFT} - - - - {children} - - - - {layout.RIGHT} - - - ); -}; - -export { ColumnsArea as default }; diff --git a/src/features/ui/util/react-router-helpers.tsx b/src/features/ui/util/react-router-helpers.tsx index a1f80f04d..6c5256af7 100644 --- a/src/features/ui/util/react-router-helpers.tsx +++ b/src/features/ui/util/react-router-helpers.tsx @@ -7,21 +7,18 @@ import { useOwnAccount, useSettings } from 'soapbox/hooks'; import ColumnForbidden from '../components/column-forbidden'; import ColumnLoading from '../components/column-loading'; -import ColumnsArea from '../components/columns-area'; import ErrorColumn from '../components/error-column'; type PageProps = { params?: MatchType['params']; - layout?: any; children: React.ReactNode; }; interface IWrappedRoute extends RouteProps { component: React.LazyExoticComponent; - page?: React.ComponentType; + page: React.ComponentType; content?: React.ReactNode; componentParams?: Record; - layout?: any; publicRoute?: boolean; staffOnly?: boolean; adminOnly?: boolean; @@ -33,7 +30,6 @@ const WrappedRoute: React.FC = ({ page: Page, content, componentParams = {}, - layout, publicRoute = false, staffOnly = false, adminOnly = false, @@ -45,33 +41,17 @@ const WrappedRoute: React.FC = ({ const { account } = useOwnAccount(); const { isDeveloper } = useSettings(); - const renderComponent = ({ match }: RouteComponentProps) => { - if (Page) { - return ( - - }> - - - {content} - - - - - ); - } - - return ( - - }> - - - {content} - - - - - ); - }; + const renderComponent = ({ match }: RouteComponentProps) => ( + + }> + + + {content} + + + + + ); const loginRedirect = () => { const actualUrl = encodeURIComponent(`${history.location.pathname}${history.location.search}`);