kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Remove local link from mobile sidebar menu
rodzic
773b26409e
commit
55be1ad5c3
|
@ -1,4 +1,3 @@
|
||||||
import atIcon from '@tabler/icons/outline/at.svg';
|
|
||||||
import banIcon from '@tabler/icons/outline/ban.svg';
|
import banIcon from '@tabler/icons/outline/ban.svg';
|
||||||
import bookmarkIcon from '@tabler/icons/outline/bookmark.svg';
|
import bookmarkIcon from '@tabler/icons/outline/bookmark.svg';
|
||||||
import calendarEventIcon from '@tabler/icons/outline/calendar-event.svg';
|
import calendarEventIcon from '@tabler/icons/outline/calendar-event.svg';
|
||||||
|
@ -36,7 +35,6 @@ import ProfileStats from 'soapbox/features/ui/components/profile-stats.tsx';
|
||||||
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch.ts';
|
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch.ts';
|
||||||
import { useAppSelector } from 'soapbox/hooks/useAppSelector.ts';
|
import { useAppSelector } from 'soapbox/hooks/useAppSelector.ts';
|
||||||
import { useFeatures } from 'soapbox/hooks/useFeatures.ts';
|
import { useFeatures } from 'soapbox/hooks/useFeatures.ts';
|
||||||
import { useInstance } from 'soapbox/hooks/useInstance.ts';
|
|
||||||
import { useSettingsNotifications } from 'soapbox/hooks/useSettingsNotifications.ts';
|
import { useSettingsNotifications } from 'soapbox/hooks/useSettingsNotifications.ts';
|
||||||
import { makeGetOtherAccounts } from 'soapbox/selectors/index.ts';
|
import { makeGetOtherAccounts } from 'soapbox/selectors/index.ts';
|
||||||
|
|
||||||
|
@ -114,7 +112,6 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
|
||||||
const sidebarOpen = useAppSelector((state) => state.sidebar.sidebarOpen);
|
const sidebarOpen = useAppSelector((state) => state.sidebar.sidebarOpen);
|
||||||
const settings = useAppSelector((state) => getSettings(state));
|
const settings = useAppSelector((state) => getSettings(state));
|
||||||
const followRequestsCount = useAppSelector((state) => state.user_lists.follow_requests.items.count());
|
const followRequestsCount = useAppSelector((state) => state.user_lists.follow_requests.items.count());
|
||||||
const { instance } = useInstance();
|
|
||||||
const settingsNotifications = useSettingsNotifications();
|
const settingsNotifications = useSettingsNotifications();
|
||||||
|
|
||||||
const closeButtonRef = useRef(null);
|
const closeButtonRef = useRef(null);
|
||||||
|
@ -271,25 +268,14 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{features.publicTimeline && <>
|
{features.publicTimeline && features.federating && (
|
||||||
<Divider />
|
|
||||||
|
|
||||||
<SidebarLink
|
<SidebarLink
|
||||||
to='/timeline/local'
|
to='/timeline/global'
|
||||||
icon={features.federating ? atIcon : worldIcon}
|
icon={worldIcon}
|
||||||
text={features.federating ? instance.domain : <FormattedMessage id='tabs_bar.all' defaultMessage='All' />}
|
text={<FormattedMessage id='tabs_bar.global' defaultMessage='Global' />}
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
{features.federating && (
|
|
||||||
<SidebarLink
|
|
||||||
to='/timeline/global'
|
|
||||||
icon={worldIcon}
|
|
||||||
text={<FormattedMessage id='tabs_bar.global' defaultMessage='Global' />}
|
|
||||||
onClick={onClose}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</>}
|
|
||||||
|
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue