Skip to content

Commit

Permalink
Build config
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan-Hill committed Jan 6, 2021
1 parent 7104c1b commit 0ad232e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build && next export",
"build": "next build",
"start": "next start"
},
"dependencies": {
Expand Down
10 changes: 10 additions & 0 deletions pages/dashboard/guilds.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ export async function getServerSideProps(ctx) {
})
.catch((err) => console.log(err));
const { data } = res;

if (!data) {
return {
redirect: {
destination: '/',
permanent: false,
},
};
}

return {
props: {
guilds: data,
Expand Down
10 changes: 10 additions & 0 deletions pages/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ export async function getServerSideProps(ctx) {
},
})
.catch((err) => console.log(err));

if (!newGuilds.data) {
return {
redirect: {
destination: '/',
permanent: false,
},
};
}

return {
props: {
guilds: newGuilds.data,
Expand Down

1 comment on commit 0ad232e

@vercel
Copy link

@vercel vercel bot commented on 0ad232e Jan 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment failed with the following error:

The value for maxDuration must be between 1 second and 10 seconds, in order to increase this limit upgrade your plan: https://vercel.com/pricing

Please sign in to comment.