diff --git a/client/src/components/section-cards.tsx b/client/src/components/section-cards.tsx
index 2b96ddf..bb71e4c 100644
--- a/client/src/components/section-cards.tsx
+++ b/client/src/components/section-cards.tsx
@@ -1,31 +1,9 @@
-import { Badge } from '@/components/ui/badge';
-import {
- Card,
- CardAction,
- CardDescription,
- CardFooter,
- CardHeader,
- CardTitle,
-} from '@/components/ui/card';
-import { Button } from './ui/button';
+import { CheckinCard } from './workbenchCards/checkin';
export function SectionCards() {
return (
-
-
- 签到状态
-
- 未签到
-
-
- Day 1
-
-
-
-
-
-
+
);
}
diff --git a/client/src/components/workbenchCards/checkin.tsx b/client/src/components/workbenchCards/checkin.tsx
new file mode 100644
index 0000000..a10f8a8
--- /dev/null
+++ b/client/src/components/workbenchCards/checkin.tsx
@@ -0,0 +1,38 @@
+import { toast } from 'sonner';
+import { Badge } from '@/components/ui/badge';
+import { Button } from '@/components/ui/button';
+import { Card, CardAction, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card';
+import { useCheckin } from '@/hooks/data/useCheckin';
+
+export function CheckinCard() {
+ const { mutateAsync, isPending } = useCheckin();
+ return (
+
+
+ 签到状态
+
+ 未签到
+
+
+ Day 1
+
+
+
+
+
+
+ );
+}
diff --git a/client/src/hooks/data/useCheckin.ts b/client/src/hooks/data/useCheckin.ts
new file mode 100644
index 0000000..3bde16f
--- /dev/null
+++ b/client/src/hooks/data/useCheckin.ts
@@ -0,0 +1,10 @@
+import { useMutation } from '@tanstack/react-query';
+import { axiosClient } from '@/lib/axios';
+
+export function useCheckin() {
+ return useMutation({
+ mutationFn: async () => {
+ return axiosClient.post