pl-fe: remove duplicated page
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -40,7 +40,7 @@ const WhoToFollowPanel = ({ limit }: IWhoToFollowPanel) => {
|
||||
<Widget
|
||||
title={<FormattedMessage id='who_to_follow.title' defaultMessage='People to follow' />}
|
||||
action={
|
||||
<Link className='text-right' to='/suggestions'>
|
||||
<Link className='text-right' to='/search?type=accounts'>
|
||||
<Text tag='span' theme='primary' size='sm' className='hover:underline'>
|
||||
<FormattedMessage id='feed_suggestions.view_all' defaultMessage='View all' />
|
||||
</Text>
|
||||
|
||||
@ -94,7 +94,6 @@ import {
|
||||
FavouritedStatuses,
|
||||
FederationRestrictions,
|
||||
Filters,
|
||||
FollowRecommendations,
|
||||
FollowRequests,
|
||||
FollowedTags,
|
||||
Followers,
|
||||
@ -260,7 +259,6 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = React.memo(({ chil
|
||||
<WrappedRoute path='/notifications' layout={DefaultLayout} component={Notifications} content={children} />
|
||||
|
||||
<WrappedRoute path='/search' layout={SearchLayout} component={Search} content={children} publicRoute />
|
||||
{features.suggestions && <WrappedRoute path='/suggestions' publicRoute layout={DefaultLayout} component={FollowRecommendations} content={children} />}
|
||||
{features.profileDirectory && <WrappedRoute path='/directory' publicRoute layout={DefaultLayout} component={Directory} content={children} />}
|
||||
{features.events && <WrappedRoute path='/events/new' layout={EventsLayout} component={ComposeEvent} content={children} />}
|
||||
{features.events && <WrappedRoute path='/events' layout={EventsLayout} component={Events} content={children} />}
|
||||
|
||||
@ -45,7 +45,6 @@ export const Filters = lazy(() => import('pl-fe/pages/settings/filters'));
|
||||
export const FollowedTags = lazy(() => import('pl-fe/pages/settings'));
|
||||
export const Followers = lazy(() => import('pl-fe/pages/account-lists/followers'));
|
||||
export const Following = lazy(() => import('pl-fe/pages/account-lists/following'));
|
||||
export const FollowRecommendations = lazy(() => import('pl-fe/pages/account-lists/follow-recommendations'));
|
||||
export const FollowRequests = lazy(() => import('pl-fe/pages/account-lists/follow-requests'));
|
||||
export const GenericNotFound = lazy(() => import('pl-fe/pages/utils/generic-not-found'));
|
||||
export const GroupBlockedMembers = lazy(() => import('pl-fe/pages/groups/group-blocked-members'));
|
||||
|
||||
@ -908,7 +908,6 @@
|
||||
"filters.filters_list_warn": "Display warning",
|
||||
"filters.removed": "Filter deleted.",
|
||||
"filters.updated": "Filter updated.",
|
||||
"follow_recommendations.heading": "Suggested profiles",
|
||||
"follow_request.authorize": "Authorize",
|
||||
"follow_request.reject": "Reject",
|
||||
"gdpr.accept": "Accept",
|
||||
|
||||
@ -1,51 +0,0 @@
|
||||
import React from 'react';
|
||||
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
||||
|
||||
import ScrollableList from 'pl-fe/components/scrollable-list';
|
||||
import Column from 'pl-fe/components/ui/column';
|
||||
import Stack from 'pl-fe/components/ui/stack';
|
||||
import Text from 'pl-fe/components/ui/text';
|
||||
import AccountContainer from 'pl-fe/containers/account-container';
|
||||
import { useSuggestions } from 'pl-fe/queries/suggestions';
|
||||
|
||||
const messages = defineMessages({
|
||||
heading: { id: 'follow_recommendations.heading', defaultMessage: 'Suggested profiles' },
|
||||
});
|
||||
|
||||
const FollowRecommendationsPage: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
|
||||
const { data: suggestions, isFetching } = useSuggestions();
|
||||
|
||||
if (suggestions.length === 0 && !isFetching) {
|
||||
return (
|
||||
<Column label={intl.formatMessage(messages.heading)}>
|
||||
<Text align='center'>
|
||||
<FormattedMessage id='empty_column.follow_recommendations' defaultMessage='Looks like no suggestions could be generated for you. You can try using search to look for people you might know or explore trending hashtags.' />
|
||||
</Text>
|
||||
</Column>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Column label={intl.formatMessage(messages.heading)}>
|
||||
<Stack space={4}>
|
||||
<ScrollableList
|
||||
scrollKey='followRecommendations'
|
||||
isLoading={isFetching}
|
||||
itemClassName='pb-4'
|
||||
>
|
||||
{suggestions.map((suggestion) => (
|
||||
<AccountContainer
|
||||
key={suggestion.account_id}
|
||||
id={suggestion.account_id}
|
||||
withAccountNote
|
||||
/>
|
||||
))}
|
||||
</ScrollableList>
|
||||
</Stack>
|
||||
</Column>
|
||||
);
|
||||
};
|
||||
|
||||
export { FollowRecommendationsPage as default };
|
||||
Reference in New Issue
Block a user