Fixed production issues, fixed render issues, added secret and env variables into dockerfile and gihub actions files, remade dockerfile and github actions

This commit is contained in:
2025-12-05 20:37:26 -05:00
parent 1893b8b371
commit 9a37330ede
7 changed files with 80 additions and 92 deletions

View File

@@ -85,14 +85,10 @@ export default function Home() {
);
useEffect(() => {
if (!thirtyDayStatsFetching && thirtyDayStats.getStatsRange) {
if (!thirtyDayStatsFetching && thirtyDayStats && !thirtyDayStatsError) {
setLineChartArrState(lineChartArr(thirtyDayStats.getStatsRange));
}
}, [
thirtyDayStats.getStatsRange,
thirtyDayStatsError,
thirtyDayStatsFetching
]);
}, [thirtyDayStats, thirtyDayStatsError, thirtyDayStatsFetching]);
return (
<Fragment>
@@ -152,23 +148,46 @@ export default function Home() {
</VStack>
</VStack>
<VStack gap={10} w="100%">
<StatsList
title="Total Stats"
loading={totalStatsFetching || totalGroupsFetching}
error={totalStatsError || totalGroupsError}
groups={totalGroups.getTotalGroups}
links={totalStats.getTotalStats.linksDeleted}
commands={totalStats.getTotalStats.commandResponses}
triggers={totalStats.getTotalStats.timesTriggered}
/>
<StatsList
title="Today's Stats"
loading={todaysStatsFetching}
error={todaysStatsError}
links={todayStats.getTodayStats.linksDeleted}
commands={todayStats.getTodayStats.commandResponses}
triggers={todayStats.getTodayStats.timesTriggered}
/>
{totalGroups ? (
<StatsList
title="Total Stats"
loading={totalStatsFetching || totalGroupsFetching}
error={totalStatsError || totalGroupsError}
groups={totalGroups.getTotalGroups}
links={totalStats.getTotalStats.linksDeleted}
commands={totalStats.getTotalStats.commandResponses}
triggers={totalStats.getTotalStats.timesTriggered}
/>
) : (
<StatsList
title="Total Stats"
loading={totalStatsFetching || totalGroupsFetching}
error={totalStatsError || totalGroupsError}
groups={0}
links={0}
commands={0}
triggers={0}
/>
)}
{todayStats ? (
<StatsList
title="Today's Stats"
loading={todaysStatsFetching}
error={todaysStatsError}
links={todayStats.getTodayStats.linksDeleted}
commands={todayStats.getTodayStats.commandResponses}
triggers={todayStats.getTodayStats.timesTriggered}
/>
) : (
<StatsList
title="Today's Stats"
loading={todaysStatsFetching}
error={todaysStatsError}
links={0}
commands={0}
triggers={0}
/>
)}
</VStack>
<VStack w="95%" gap="5vh">
<VStack gap={1}>