fixed conditional rendering logic
All checks were successful
Main / build-and-push-docker-image (20.x) (push) Successful in 7m27s

This commit is contained in:
2025-12-06 23:46:04 -05:00
parent 9146a0c340
commit 678d1e7b5e
2 changed files with 16 additions and 8 deletions

View File

@@ -29,17 +29,23 @@ const StatsList = ({
{title}
</Heading>
<Text textAlign="center" fontSize="sm" color="whiteAlpha.800">
{groups ? "Updates every 24 hours" : "At time of page load"}
{groups !== undefined
? groups >= 0
? "Updates every 24 hours"
: ""
: "At time of page load"}
</Text>
</VStack>
<Flex w="80%" flexDirection={{ base: "column", md: "row" }} gap={4}>
{groups && groups >= 0 ? (
<SingleStatComponent
loading={loading}
title="Groups Bot Helped"
error={error}
stat={groups}
/>
{groups !== undefined ? (
groups >= 0 ? (
<SingleStatComponent
loading={loading}
title="Groups Bot Helped"
error={error}
stat={groups}
/>
) : null
) : null}
<SingleStatComponent
loading={loading}

View File

@@ -8,6 +8,8 @@ interface NextContext {
params: Promise<Record<string, string>>;
}
console.log(process.env);
const environment = process.env.NODE_ENV || "development";
const isValidApiKey = (apiKey: string): boolean => {