Skip to content

Commit

Permalink
Merge pull request #95 from vtex-apps/fix/next-link
Browse files Browse the repository at this point in the history
Fixing the Next Article link to work with trailing slash
  • Loading branch information
lucis authored Jun 24, 2020
2 parents 49bf320 + 760f51b commit 084053e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Link `Next Article` and `Previous Article` to work with trailing slash.

## [2.1.1] - 2020-06-12
### Fixed
Expand Down
12 changes: 10 additions & 2 deletions react/GettingStartedArticle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ const GettingStartedArticle: FC<OuterProps & InjectedRuntime> = ({
{hasPrevArticle(currentArticle) && (
<Link
className="link c-emphasis no-underline t-body mr-auto flex items-center dim"
to={`${currentArticle - 1}`}>
page="docs-ui.getting-started"
params={{
track,
article: `${currentArticle - 1}`,
}}>
<div className="flex flex-column flex-row-l">
<div className="dn db-l mr5">
<LeftArrow />
Expand All @@ -74,7 +78,11 @@ const GettingStartedArticle: FC<OuterProps & InjectedRuntime> = ({
{hasNextArticle(articles, currentArticle) && (
<Link
className="link c-emphasis no-underline t-body ml-auto flex items-center dim"
to={`${currentArticle + 1}`}>
page="docs-ui.getting-started"
params={{
track,
article: `${currentArticle + 1}`,
}}>
<div className="flex flex-column flex-row-l">
<FormattedMessage id="docs-ui/getting-started.next" />
<div className="dn db-l ml5">
Expand Down

0 comments on commit 084053e

Please sign in to comment.