Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
fix: language switcher swapping positions, now .sort()ed
Browse files Browse the repository at this point in the history
  • Loading branch information
CanRau committed Apr 5, 2018
1 parent 92095be commit 70cdd0f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/MainLayout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ const getTranslations = page => [
title: page.frontmatter.title,
},
},
]
].sort((a, b) =>
a.frontmatter.lang < b.frontmatter.lang
? -1
: a.frontmatter.lang > b.frontmatter.lang
? 1
: 0
)

// i18n.init({
// initImmediate: false,
Expand Down

0 comments on commit 70cdd0f

Please sign in to comment.