Use instance domain for local timeline
This commit is contained in:
parent
e47eb6530c
commit
c7ff472ae0
|
@ -248,8 +248,8 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
|
|||
|
||||
<SidebarLink
|
||||
to='/timeline/local'
|
||||
icon={features.federating ? require('@tabler/icons/outline/users-group.svg') : require('@tabler/icons/outline/world.svg')}
|
||||
text={features.federating ? instance.title : <FormattedMessage id='tabs_bar.all' defaultMessage='All' />}
|
||||
icon={features.federating ? require('@tabler/icons/outline/at.svg') : require('@tabler/icons/outline/world.svg')}
|
||||
text={features.federating ? instance.domain : <FormattedMessage id='tabs_bar.all' defaultMessage='All' />}
|
||||
onClick={onClose}
|
||||
/>
|
||||
|
||||
|
|
|
@ -178,8 +178,8 @@ const SidebarNavigation = () => {
|
|||
{(account || !restrictUnauth.timelines.local) && (
|
||||
<SidebarNavigationLink
|
||||
to='/timeline/local'
|
||||
icon={features.federating ? require('@tabler/icons/outline/users-group.svg') : require('@tabler/icons/outline/world.svg')}
|
||||
text={features.federating ? instance.title : <FormattedMessage id='tabs_bar.global' defaultMessage='Global' />}
|
||||
icon={features.federating ? require('@tabler/icons/outline/at.svg') : require('@tabler/icons/outline/world.svg')}
|
||||
text={features.federating ? instance.domain : <FormattedMessage id='tabs_bar.global' defaultMessage='Global' />}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
|
@ -1,23 +1,19 @@
|
|||
import React, { useEffect } from 'react';
|
||||
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { expandCommunityTimeline } from 'soapbox/actions/timelines';
|
||||
import { useCommunityStream } from 'soapbox/api/hooks';
|
||||
import PullToRefresh from 'soapbox/components/pull-to-refresh';
|
||||
import { Column } from 'soapbox/components/ui';
|
||||
import { useAppSelector, useAppDispatch, useSettings, useTheme } from 'soapbox/hooks';
|
||||
import { useAppSelector, useAppDispatch, useSettings, useTheme, useInstance } from 'soapbox/hooks';
|
||||
import { useIsMobile } from 'soapbox/hooks/useIsMobile';
|
||||
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
||||
const messages = defineMessages({
|
||||
title: { id: 'column.community', defaultMessage: 'Local timeline' },
|
||||
});
|
||||
|
||||
const CommunityTimeline = () => {
|
||||
const intl = useIntl();
|
||||
const dispatch = useAppDispatch();
|
||||
const theme = useTheme();
|
||||
const instance = useInstance();
|
||||
|
||||
const settings = useSettings();
|
||||
const onlyMedia = settings.community.other.onlyMedia;
|
||||
|
@ -41,7 +37,7 @@ const CommunityTimeline = () => {
|
|||
}, [onlyMedia]);
|
||||
|
||||
return (
|
||||
<Column className='-mt-3 sm:mt-0' label={intl.formatMessage(messages.title)} transparent={!isMobile}>
|
||||
<Column className='-mt-3 sm:mt-0' label={instance.domain} transparent={!isMobile}>
|
||||
<PullToRefresh onRefresh={handleRefresh}>
|
||||
<Timeline
|
||||
className='black:p-4 black:sm:p-5'
|
||||
|
|
|
@ -357,7 +357,6 @@
|
|||
"column.blocks": "Blocks",
|
||||
"column.bookmarks": "Bookmarks",
|
||||
"column.chats": "Chats",
|
||||
"column.community": "Local timeline",
|
||||
"column.crypto_donate": "Donate Cryptocurrency",
|
||||
"column.developers": "Developers",
|
||||
"column.developers.service_worker": "Service Worker",
|
||||
|
|
Loading…
Reference in New Issue