Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Article-ArticleNav): rectify icon position #593

Merged
merged 1 commit into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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