From deee511f8642b5d37e33ff8af358ccbfef80c997 Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Sat, 2 Dec 2023 12:41:07 +0100 Subject: [PATCH] Fix unused function and enable user count check in getServerSideProps --- .../Tools/Docker/docker-select-board.modal.tsx | 3 --- src/pages/onboard.tsx | 12 ++++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/components/Manage/Tools/Docker/docker-select-board.modal.tsx b/src/components/Manage/Tools/Docker/docker-select-board.modal.tsx index 4248f4b0e4b..688c6796ce0 100644 --- a/src/components/Manage/Tools/Docker/docker-select-board.modal.tsx +++ b/src/components/Manage/Tools/Docker/docker-select-board.modal.tsx @@ -141,6 +141,3 @@ export const openDockerSelectBoardModal = (innerProps: InnerProps) => { }); umami.track('Add to homarr modal'); }; -function uuidv4(): any { - throw new Error('Function not implemented.'); -} diff --git a/src/pages/onboard.tsx b/src/pages/onboard.tsx index 7b98b3da1a2..05b34c07c00 100644 --- a/src/pages/onboard.tsx +++ b/src/pages/onboard.tsx @@ -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));