mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
Move players page to /players (#439)
* Move players page to /players * Using redirects in next.config
This commit is contained in:
@@ -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,
|
||||
},
|
||||
]
|
||||
},
|
||||
});
|
||||
|
||||
@@ -184,7 +184,7 @@ export const getStaticProps = async (
|
||||
if (username == null) {
|
||||
return {
|
||||
redirect: {
|
||||
desination: '/',
|
||||
destination: '/',
|
||||
permanent: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -12,7 +12,7 @@ export interface DrawerItemType {
|
||||
|
||||
export const DrawerItemsLeft: DrawerItemType[] = [
|
||||
{
|
||||
href: '/',
|
||||
href: '/players',
|
||||
isExternal: false,
|
||||
src: emojiUrl('alien.png'),
|
||||
alt: 'MetaPlayers',
|
||||
|
||||
Reference in New Issue
Block a user