Skip to content

Commit 067ab3f

Browse files
committed
- upgrade dependencies
- add trailing slash for canonical and alternative links in `Helmet` Signed-off-by: Dmitriy Nevzorov <jimmy.lugat@gmail.com>
1 parent dd549c0 commit 067ab3f

File tree

3 files changed

+355
-1119
lines changed

3 files changed

+355
-1119
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@
4242
"release": "release-it"
4343
},
4444
"devDependencies": {
45-
"@babel/cli": "^7.10.3",
45+
"@babel/cli": "^7.10.5",
4646
"@types/bluebird": "^3.5.32",
47-
"@types/react": "^16.9.41",
47+
"@types/react": "^16.9.43",
4848
"@types/react-helmet": "^6.0.0",
4949
"babel-preset-gatsby-package": "^0.4.6",
50-
"gatsby": "^2.23.11",
50+
"gatsby": "^2.24.3",
5151
"husky": "^4.2.5",
52-
"i18next": "^19.5.1",
52+
"i18next": "^19.6.2",
5353
"prettier": "^2.0.5",
5454
"pretty-quick": "^2.0.1",
5555
"react-i18next": "^11.7.0",
56-
"release-it": "^13.6.3",
57-
"typescript": "^3.9.5"
56+
"release-it": "^13.6.5",
57+
"typescript": "^3.9.7"
5858
},
5959
"dependencies": {
6060
"bluebird": "^3.7.2",

src/Helmet.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import {useI18next} from './useI18next';
55
export const Helmet: React.FC<HelmetProps> = ({children, ...props}) => {
66
const {languages, language, originalPath, defaultLanguage, siteUrl = ''} = useI18next();
77
const createUrlWithLang = (lng: string) => {
8-
return `${siteUrl}${lng === defaultLanguage ? '' : `/${lng}`}${originalPath}`;
8+
const url = `${siteUrl}${lng === defaultLanguage ? '' : `/${lng}`}${originalPath}`;
9+
return url.endsWith('/') ? url : `${url}/`;
910
};
1011
return (
1112
<ReactHelmet {...props}>

0 commit comments

Comments
 (0)