diff --git a/src/app/page.tsx b/src/app/page.tsx index 7968884..7315609 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -210,30 +210,51 @@ export default function Home() { - - - {"Down with fascism! Fuck MAGA! Fuck Trump! Fuck Nazis!"} - - - { - "Trans rights are human rights! Trans women are women! Trans men are men! Never let them take away your happiness!" - } - - - - intersex inclusive pride flag + + + {"Down with fascism! Fuck MAGA! Fuck Trump! Fuck Nazis!"} + + + { + "Trans rights are human rights! Trans women are women! Trans men are men! Never let them take away your happiness!" + } + + - + ); } diff --git a/src/components/charts/LineChart.tsx b/src/components/charts/LineChart.tsx index 8bad303..228cee3 100644 --- a/src/components/charts/LineChart.tsx +++ b/src/components/charts/LineChart.tsx @@ -32,7 +32,7 @@ const LineChartComponent = ({ axisLine={false} dataKey={chart.key("day")} stroke={chart.color("border")} - // label={{ value: "Day", position: "bottom" }} + label={{ value: "Date", position: "bottom" }} /> { const { startDate, endDate } = data; + + if (!startDate || !endDate) { + return null; + } + return await prisma.dailyStats.findMany({ where: { createdAt: { @@ -59,23 +64,12 @@ export const resolvers = { _parent: unknown, data: { groupID: number } // _ctx: unknown - ) => { - const groupIDInt = BigInt(data.groupID); - - const group = await prisma.groups.findUnique({ + ) => + await prisma.groups.findUnique({ where: { - telegramID: groupIDInt + telegramID: BigInt(data.groupID) } - }); - - if (group === null) { - const groups = await prisma.groups.findMany({ - orderBy: { name: "asc" } - }); - } - - return group; - } + }) }, Mutation: { init: async ( @@ -230,7 +224,6 @@ export const resolvers = { // _ctx: unknown ) => { const { groupID, linksDeleted, mutationKey } = data; - const groupIDInt = BigInt(groupID); if (env !== "development") { if (!mutationKey) { @@ -243,7 +236,7 @@ export const resolvers = { } return await prisma.groups.update({ - where: { telegramID: groupIDInt }, + where: { telegramID: BigInt(groupID) }, data: { linksDeleted: { increment: linksDeleted } } }); },