Skip to content

Commit

Permalink
fix(Article-ArticleNav): rectify icon position (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabertazimi authored Apr 15, 2022
1 parent 0fcb1f2 commit 9e03747
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/components/Article/ArticleNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const ArticleNav = ({ post: { prevPost, nextPost } }: Props): JSX.Element => (
'button-primary'
)}
size="large"
icon={prevPost ? <ArrowLeftOutlined /> : <HomeOutlined />}
>
{prevPost ? <ArrowLeftOutlined /> : <HomeOutlined />}
<Link
className="m-auto font-extrabold text-light"
to={prevPost ? prevPost.slug : '/posts'}
Expand All @@ -43,14 +43,14 @@ const ArticleNav = ({ post: { prevPost, nextPost } }: Props): JSX.Element => (
'button-primary'
)}
size="large"
icon={nextPost ? <ArrowRightOutlined /> : <HomeOutlined />}
>
<Link
className="m-auto font-extrabold text-light"
to={nextPost ? nextPost.slug : '/posts'}
>
{nextPost ? nextPost.title : 'Back to Home'}
</Link>
{nextPost ? <ArrowRightOutlined /> : <HomeOutlined />}
</Button>
</FlexContainer>
);
Expand Down
24 changes: 12 additions & 12 deletions src/components/Article/__snapshots__/Article.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ exports[`Article should render correctly (snapshot) 1`] = `
onClick={[Function]}
type="button"
>
<a
className="m-auto font-extrabold text-light"
href="/javascriptAdvancedNotes/"
>
JavaScript Advanced Notes
</a>
<span
aria-label="arrow-right"
className="anticon anticon-arrow-right"
Expand All @@ -260,12 +266,6 @@ exports[`Article should render correctly (snapshot) 1`] = `
/>
</svg>
</span>
<a
className="m-auto font-extrabold text-light"
href="/javascriptAdvancedNotes/"
>
JavaScript Advanced Notes
</a>
</button>
</div>
<div
Expand Down Expand Up @@ -652,6 +652,12 @@ exports[`Article should render correctly with partial data (snapshot) 1`] = `
onClick={[Function]}
type="button"
>
<a
className="m-auto font-extrabold text-light"
href="/posts"
>
Back to Home
</a>
<span
aria-label="home"
className="anticon anticon-home"
Expand All @@ -671,12 +677,6 @@ exports[`Article should render correctly with partial data (snapshot) 1`] = `
/>
</svg>
</span>
<a
className="m-auto font-extrabold text-light"
href="/posts"
>
Back to Home
</a>
</button>
</div>
<div
Expand Down

0 comments on commit 9e03747

Please sign in to comment.