Skip to content

Commit

Permalink
Fix unused function and enable user count check in
Browse files Browse the repository at this point in the history
getServerSideProps
  • Loading branch information
ajnart committed Dec 2, 2023
1 parent 48ca535 commit deee511
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,3 @@ export const openDockerSelectBoardModal = (innerProps: InnerProps) => {
});
umami.track('Add to homarr modal');
};
function uuidv4(): any {
throw new Error('Function not implemented.');
}
12 changes: 6 additions & 6 deletions src/pages/onboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ export default function OnboardPage({
}

export const getServerSideProps: GetServerSideProps = async (ctx) => {
// const userCount = await getTotalUserCountAsync();
// if (userCount >= 1) {
// return {
// notFound: true,
// };
// }
const userCount = await getTotalUserCountAsync();
if (userCount >= 1) {
return {
notFound: true,
};
}

const files = fs.readdirSync('./data/configs').filter((file) => file.endsWith('.json'));
const configs = files.map((file) => getConfig(file));
Expand Down

0 comments on commit deee511

Please sign in to comment.