@ -3,6 +3,7 @@ import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
import { Link } from 'react-router-dom' ;
import { Link } from 'react-router-dom' ;
import { expandHomeTimeline } from 'soapbox/actions/timelines' ;
import { expandHomeTimeline } from 'soapbox/actions/timelines' ;
import PullToRefresh from 'soapbox/components/pull-to-refresh' ;
import { Column , Stack , Text } from 'soapbox/components/ui' ;
import { Column , Stack , Text } from 'soapbox/components/ui' ;
import Timeline from 'soapbox/features/ui/components/timeline' ;
import Timeline from 'soapbox/features/ui/components/timeline' ;
import { useAppSelector , useAppDispatch , useFeatures } from 'soapbox/hooks' ;
import { useAppSelector , useAppDispatch , useFeatures } from 'soapbox/hooks' ;
@ -59,47 +60,48 @@ const HomeTimeline: React.FC = () => {
return (
return (
< Column label = { intl . formatMessage ( messages . title ) } transparent >
< Column label = { intl . formatMessage ( messages . title ) } transparent >
< Timeline
< PullToRefresh onRefresh = { handleRefresh } >
scrollKey = 'home_timeline'
< Timeline
onLoadMore = { handleLoadMore }
scrollKey = 'home_timeline'
onRefresh = { handleRefresh }
onLoadMore = { handleLoadMore }
timelineId = 'home'
timelineId = 'home'
divideType = 'space'
divideType = 'space'
emptyMessage = {
emptyMessage = {
< Stack space = { 1 } >
< Stack space = { 1 } >
< Text size = 'xl' weight = 'medium' align = 'center' >
< Text size = 'xl' weight = 'medium' align = 'center' >
< FormattedMessage
< FormattedMessage
id = 'empty_column.home.title'
id = 'empty_column.home.title'
defaultMessage = "You're not following anyone yet"
defaultMessage = "You're not following anyone yet"
/ >
/ >
< / Text >
< / Text >
< Text theme = 'muted' align = 'center' >
< FormattedMessage
id = 'empty_column.home.subtitle'
defaultMessage = '{siteTitle} gets more interesting once you follow other users.'
values = { { siteTitle } }
/ >
< / Text >
{ features . federating && (
< Text theme = 'muted' align = 'center' >
< Text theme = 'muted' align = 'center' >
< FormattedMessage
< FormattedMessage
id = 'empty_column.home'
id = 'empty_column.home.subtitle'
defaultMessage = 'Or you can visit {public} to get started and meet other users.'
defaultMessage = '{siteTitle} gets more interesting once you follow other users.'
values = { {
values = { { siteTitle } }
public : (
< Link to = '/timeline/local' className = 'text-primary-600 dark:text-primary-400 hover:underline' >
< FormattedMessage id = 'empty_column.home.local_tab' defaultMessage = 'the {site_title} tab' values = { { site_title : siteTitle } } / >
< / Link >
) ,
} }
/ >
/ >
< / Text >
< / Text >
) }
< / Stack >
{ features . federating && (
}
< Text theme = 'muted' align = 'center' >
/ >
< FormattedMessage
id = 'empty_column.home'
defaultMessage = 'Or you can visit {public} to get started and meet other users.'
values = { {
public : (
< Link to = '/timeline/local' className = 'text-primary-600 dark:text-primary-400 hover:underline' >
< FormattedMessage id = 'empty_column.home.local_tab' defaultMessage = 'the {site_title} tab' values = { { site_title : siteTitle } } / >
< / Link >
) ,
} }
/ >
< / Text >
) }
< / Stack >
}
/ >
< / PullToRefresh >
< / Column >
< / Column >
) ;
) ;
} ;
} ;