Skip to content

Commit c22eaa4

Browse files
committed
fix: issues indicated by Copilot
1 parent 94edbe0 commit c22eaa4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/(admin)/_components/login-count.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/com
44
import { Skeleton } from "@/components/ui/skeleton";
55
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
66
import { graphql } from "@/gql";
7-
import { type SubmissionWhereInput } from "@/gql/graphql";
7+
import { type EventWhereInput } from "@/gql/graphql";
88
import { useLazyQuery } from "@apollo/client/react";
99
import { useEffect, useState } from "react";
1010

@@ -32,12 +32,12 @@ export default function LoginTotalCount() {
3232
useEffect(() => {
3333
const now = new Date();
3434

35-
const timeRangeWhere: Record<TimeRange, SubmissionWhereInput> = {
35+
const timeRangeWhere: Record<TimeRange, EventWhereInput> = {
3636
daily: {
37-
submittedAtGTE: new Date(now.setDate(now.getDate() - 1)).toISOString(),
37+
triggeredAtGTE: new Date(now.setDate(now.getDate() - 1)).toISOString(),
3838
},
3939
weekly: {
40-
submittedAtGTE: new Date(now.setDate(now.getDate() - 7)).toISOString(),
40+
triggeredAtGTE: new Date(now.setDate(now.getDate() - 7)).toISOString(),
4141
},
4242
all: {},
4343
};

app/(admin)/_components/rank.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ function ScoreCell(
270270

271271
return (
272272
<span className="font-semibold">
273-
{components[rankingBy] ?? <span className="text-red-800">發現未定義的排序依據 {rankingBy}</span>}
273+
{components[rankingBy]}
274274
{" | "}
275275
<ScoreDiff userFragment={user} />
276276
</span>

0 commit comments

Comments
 (0)