Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit 979bc83

Browse files
authored
Merge pull request #4656 from tuoxiansp/fix-emptythread-on-mobile
fix 「 post your first thread 」Button in emptyThreadFeed on mobile .
2 parents a1e941b + 8e22997 commit 979bc83

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/views/dashboard/components/emptyThreadFeed.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { openComposer } from '../../../actions/composer';
88
import Icon from '../../../components/icons';
99
import { Button } from '../../../components/buttons';
1010
import { NullThreadFeed, NullHeading, OutlineButton, Hint } from '../style';
11+
import { isMobile } from '../../../helpers/utils';
1112

1213
const EmptyThreadFeed = ({ dispatch }) => (
1314
<NullThreadFeed>
@@ -17,9 +18,15 @@ const EmptyThreadFeed = ({ dispatch }) => (
1718
<NullHeading>We've got recommendations!</NullHeading>
1819
<Hint>Kick your community off right!</Hint>
1920
{/* dispatch activethread to 'new'? */}
20-
<Button icon={'post'} onClick={() => dispatch(openComposer())}>
21-
Post your first thread
22-
</Button>
21+
{isMobile() ? (
22+
<Link to={'/new/thread'}>
23+
<Button icon={'post'}>Post your first thread</Button>
24+
</Link>
25+
) : (
26+
<Button icon={'post'} onClick={() => dispatch(openComposer())}>
27+
Post your first thread
28+
</Button>
29+
)}
2330
<Hint>Find new friends and great conversations!</Hint>
2431
<Link to={'/explore'}>
2532
<OutlineButton>

0 commit comments

Comments
 (0)