Move players page to /players (#439)

* Move players page to /players

* Using redirects in next.config
This commit is contained in:
Pacien Boisson
2021-03-29 11:50:06 +04:00
committed by GitHub
parent 8821e4cf49
commit d16f866391
4 changed files with 15 additions and 5 deletions

View File

@@ -1,4 +1,14 @@
// eslint-disable-next-line
const withImages = require('next-images');
module.exports = withImages();
module.exports = withImages({
async redirects() {
return [
{
source: '/',
destination: '/players',
permanent: false,
},
]
},
});

View File

@@ -184,7 +184,7 @@ export const getStaticProps = async (
if (username == null) {
return {
redirect: {
desination: '/',
destination: '/',
permanent: false,
},
}

View File

@@ -16,10 +16,10 @@ export const getStaticProps = async () => {
};
};
const Home: React.FC<Props> = ({ players }) => (
const Players: React.FC<Props> = ({ players }) => (
<PageContainer>
<PlayerList players={players} />
</PageContainer>
);
export default Home;
export default Players;

View File

@@ -12,7 +12,7 @@ export interface DrawerItemType {
export const DrawerItemsLeft: DrawerItemType[] = [
{
href: '/',
href: '/players',
isExternal: false,
src: emojiUrl('alien.png'),
alt: 'MetaPlayers',