diff --git a/src/actions/about.ts b/src/actions/about.ts index 07a486fd2..c8410ded8 100644 --- a/src/actions/about.ts +++ b/src/actions/about.ts @@ -1,16 +1,17 @@ -import { staticClient } from '../api'; +import api from '../api'; import type { AnyAction } from 'redux'; +import type { RootState } from 'soapbox/store'; const FETCH_ABOUT_PAGE_REQUEST = 'FETCH_ABOUT_PAGE_REQUEST'; const FETCH_ABOUT_PAGE_SUCCESS = 'FETCH_ABOUT_PAGE_SUCCESS'; const FETCH_ABOUT_PAGE_FAIL = 'FETCH_ABOUT_PAGE_FAIL'; -const fetchAboutPage = (slug = 'index', locale?: string) => (dispatch: React.Dispatch) => { +const fetchAboutPage = (slug = 'index', locale?: string) => (dispatch: React.Dispatch, getState: () => RootState) => { dispatch({ type: FETCH_ABOUT_PAGE_REQUEST, slug, locale }); const filename = `${slug}${locale ? `.${locale}` : ''}.html`; - return staticClient.get(`/instance/about/${filename}`) + return api(getState).get(`/instance/about/${filename}`) .then(({ data: html }) => { dispatch({ type: FETCH_ABOUT_PAGE_SUCCESS, slug, locale, html }); return html; diff --git a/src/containers/soapbox.tsx b/src/containers/soapbox.tsx index 92911789d..811784cbd 100644 --- a/src/containers/soapbox.tsx +++ b/src/containers/soapbox.tsx @@ -110,7 +110,6 @@ const SoapboxMount = () => { )} - {(features.accountCreation && instance.registrations) && ( diff --git a/src/features/about/index.tsx b/src/features/about/index.tsx index 8d1be5c2e..0112c786a 100644 --- a/src/features/about/index.tsx +++ b/src/features/about/index.tsx @@ -3,6 +3,7 @@ import { FormattedMessage } from 'react-intl'; import { useParams } from 'react-router-dom'; import { fetchAboutPage } from 'soapbox/actions/about'; +import { Card } from 'soapbox/components/ui'; import { useSoapboxConfig, useSettings, useAppDispatch } from 'soapbox/hooks'; import { languages } from '../preferences'; @@ -60,11 +61,12 @@ const AboutPage: React.FC = () => { ); return ( -
-
- - {alsoAvailable} -
+ +
+
+ {alsoAvailable} +
+ ); }; diff --git a/src/features/public-layout/index.tsx b/src/features/public-layout/index.tsx index 4b5801eb0..e39bb7508 100644 --- a/src/features/public-layout/index.tsx +++ b/src/features/public-layout/index.tsx @@ -5,7 +5,6 @@ import LandingGradient from 'soapbox/components/landing-gradient'; import { useAppSelector } from 'soapbox/hooks'; import { isStandalone } from 'soapbox/utils/state'; -import AboutPage from '../about'; import LandingPage from '../landing-page'; import Footer from './components/footer'; @@ -29,7 +28,6 @@ const PublicLayout = () => {
-
diff --git a/src/features/ui/index.tsx b/src/features/ui/index.tsx index cb2da25d1..68b65e19f 100644 --- a/src/features/ui/index.tsx +++ b/src/features/ui/index.tsx @@ -134,6 +134,7 @@ import { Announcements, EditGroup, FollowedTags, + AboutPage, } from './util/async-components'; import GlobalHotkeys from './util/global-hotkeys'; import { WrappedRoute } from './util/react-router-helpers'; @@ -350,6 +351,8 @@ const SwitchingColumnsArea: React.FC = ({ children }) => + + ); diff --git a/src/features/ui/util/async-components.ts b/src/features/ui/util/async-components.ts index 19a7c3b36..499883f90 100644 --- a/src/features/ui/util/async-components.ts +++ b/src/features/ui/util/async-components.ts @@ -1,3 +1,7 @@ +export function AboutPage() { + return import('../../about'); +} + export function EmojiPicker() { return import('../../emoji/components/emoji-picker'); } diff --git a/src/instance/about.example/index.html b/src/instance/about.example/index.html index 6af826f85..6f1a5dc39 100644 --- a/src/instance/about.example/index.html +++ b/src/instance/about.example/index.html @@ -2,7 +2,7 @@

Your_Instance description

Your_Instance is a way to join the Fediverse, to be part of a community, and to reclaim your freedom of speech in social media.

-

Site rules

+

Site rules

Please refrain from:

  1. Posting anything illegal.
  2. @@ -22,6 +22,6 @@
  3. A bot where all posts are unlisted.
-

Open Source Software

+

Open Source Software

Soapbox is free and open source (FOSS) software.

The Soapbox repository can be found at Soapbox