Fix hashtag layout, remove follow button from tag timeline
This commit is contained in:
parent
a8bb49c091
commit
d3193d3fd5
|
@ -70,14 +70,14 @@ const FollowedHashtags = () => {
|
|||
>
|
||||
{
|
||||
tags?.map((tag) => (
|
||||
<div className='p-1 bg-gray-100 dark:bg-slate-900 rounded flex justify-between items-center'>
|
||||
<div className='flex items-center'>
|
||||
<div className='p-1 bg-gray-100 dark:bg-slate-900 rounded flex flex-wrap justify-between items-center'>
|
||||
<div className='flex items-center grow'>
|
||||
<Icon src={require('@tabler/icons/hash.svg')} />
|
||||
<Text tag='span' weight='semibold'>
|
||||
{ tag.name }
|
||||
</Text>
|
||||
</div>
|
||||
<div className='flex items-center gap-3'>
|
||||
<div className='flex items-center gap-3 grow shrink justify-end'>
|
||||
<FollowButton id={tag.name} />
|
||||
<span className='dark:text-slate-800 text-gray-300' >|</span>
|
||||
<Button theme='link' to={`/tag/${tag.name}`}>
|
||||
|
|
|
@ -12,6 +12,7 @@ import { expandHashtagTimeline, clearTimeline } from '../../actions/timelines';
|
|||
import ColumnHeader from '../../components/column_header';
|
||||
import { Button, Column, Spinner } from '../../components/ui';
|
||||
import Timeline from '../ui/components/timeline';
|
||||
import { isLoggedIn } from 'soapbox/utils/auth';
|
||||
|
||||
interface IFollowButton {
|
||||
id: string,
|
||||
|
@ -54,6 +55,7 @@ const HashtagTimeline: React.FC = () => {
|
|||
const disconnects = React.useRef([]);
|
||||
const { id, tags } = useParams<{ id: string, tags: any }>();
|
||||
const prevParams = React.useRef({ id, tags });
|
||||
const isLoggedIn = useAppSelector((state) => state.me);
|
||||
|
||||
const hasUnread = useAppSelector((state) => (state.getIn(['timelines', `hashtag:${id}`, 'unread']) as number) > 0);
|
||||
|
||||
|
@ -137,7 +139,11 @@ const HashtagTimeline: React.FC = () => {
|
|||
title={
|
||||
<div className='flex justify-between items-center'>
|
||||
{ title }
|
||||
<FollowButton id={id} />
|
||||
{
|
||||
isLoggedIn && (
|
||||
<FollowButton id={id} />
|
||||
)
|
||||
}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue