Removed image. Added gradient. Removed unnecessary logic in resolvers. Added line chart label.
Some checks are pending
Main / build-and-push-docker-image (20.x) (push) Waiting to run

This commit is contained in:
2025-12-16 17:11:44 -05:00
parent 0b0039ce01
commit 07aa4ff6b5
3 changed files with 55 additions and 41 deletions

View File

@@ -210,6 +210,33 @@ export default function Home() {
</VStack> </VStack>
</VStack> </VStack>
</VStack> </VStack>
<Box
bgImage={`linear-gradient(
to right,
rgb(85, 205, 252),
rgb(179, 157, 233),
rgb(247, 168, 184),
rgb(246, 216, 221),
rgb(255, 255, 255) 10%,
rgb(0, 0, 0),
rgb(54, 35, 18),
rgb(120, 79, 23),
rgb(181, 63, 27),
rgb(237, 34, 36),
rgb(243, 91, 34),
rgb(249, 150, 33),
rgb(245, 193, 30),
rgb(241, 235, 27) 48%,
rgb(241, 235, 27),
rgb(241, 235, 27) 52%,
rgb(99, 199, 32),
rgb(12, 155, 73),
rgb(33, 135, 141),
rgb(57, 84, 165),
rgb(97, 55, 155),
rgb(147, 40, 142)
)`}
>
<VStack <VStack
w="100vw" w="100vw"
py="5vh" py="5vh"
@@ -227,13 +254,7 @@ export default function Home() {
} }
</Text> </Text>
</VStack> </VStack>
<Box w="100vw" h="100vh" position="fixed" bottom="-510px" zIndex={-1}>
<Image
fill
alt="intersex inclusive pride flag"
src="https://upload.wikimedia.org/wikipedia/commons/6/60/Intersex-inclusive_pride_flag.svg"
/>
</Box> </Box>
</Fragment> </Fragment >
); );
} }

View File

@@ -32,7 +32,7 @@ const LineChartComponent = ({
axisLine={false} axisLine={false}
dataKey={chart.key("day")} dataKey={chart.key("day")}
stroke={chart.color("border")} stroke={chart.color("border")}
// label={{ value: "Day", position: "bottom" }} label={{ value: "Date", position: "bottom" }}
/> />
<YAxis <YAxis
width="auto" width="auto"

View File

@@ -37,6 +37,11 @@ export const resolvers = {
// _ctx: unknown // _ctx: unknown
) => { ) => {
const { startDate, endDate } = data; const { startDate, endDate } = data;
if (!startDate || !endDate) {
return null;
}
return await prisma.dailyStats.findMany({ return await prisma.dailyStats.findMany({
where: { where: {
createdAt: { createdAt: {
@@ -59,23 +64,12 @@ export const resolvers = {
_parent: unknown, _parent: unknown,
data: { groupID: number } data: { groupID: number }
// _ctx: unknown // _ctx: unknown
) => { ) =>
const groupIDInt = BigInt(data.groupID); await prisma.groups.findUnique({
const group = await prisma.groups.findUnique({
where: { where: {
telegramID: groupIDInt telegramID: BigInt(data.groupID)
}
});
if (group === null) {
const groups = await prisma.groups.findMany({
orderBy: { name: "asc" }
});
}
return group;
} }
})
}, },
Mutation: { Mutation: {
init: async ( init: async (
@@ -230,7 +224,6 @@ export const resolvers = {
// _ctx: unknown // _ctx: unknown
) => { ) => {
const { groupID, linksDeleted, mutationKey } = data; const { groupID, linksDeleted, mutationKey } = data;
const groupIDInt = BigInt(groupID);
if (env !== "development") { if (env !== "development") {
if (!mutationKey) { if (!mutationKey) {
@@ -243,7 +236,7 @@ export const resolvers = {
} }
return await prisma.groups.update({ return await prisma.groups.update({
where: { telegramID: groupIDInt }, where: { telegramID: BigInt(groupID) },
data: { linksDeleted: { increment: linksDeleted } } data: { linksDeleted: { increment: linksDeleted } }
}); });
}, },