From f7e1c8114b38c740f37e69125bd31fb26e1c2a1f Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sun, 18 Aug 2024 22:41:06 +0800 Subject: [PATCH] chore: fix ci problem --- src/client/hooks/useGlobalRangeDate.tsx | 1 + src/client/routes/register.tsx | 1 - src/server/ws/index.ts | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/hooks/useGlobalRangeDate.tsx b/src/client/hooks/useGlobalRangeDate.tsx index acafc3e..5af1118 100644 --- a/src/client/hooks/useGlobalRangeDate.tsx +++ b/src/client/hooks/useGlobalRangeDate.tsx @@ -4,6 +4,7 @@ import { getMinimumUnit } from '@tianji/shared'; import { DateRange, useGlobalStateStore } from '../store/global'; import { DateUnit } from '../utils/date'; import { useTranslation } from '@i18next-toolkit/react'; +import { CalendarOutlined } from '@ant-design/icons'; export function useGlobalRangeDate(): { label: React.ReactNode; diff --git a/src/client/routes/register.tsx b/src/client/routes/register.tsx index 185948b..8af79e1 100644 --- a/src/client/routes/register.tsx +++ b/src/client/routes/register.tsx @@ -1,7 +1,6 @@ import { Form, Typography } from 'antd'; import { useRequest } from '../hooks/useRequest'; import { trpc } from '../api/trpc'; -import { setJWT } from '../api/authjs'; import { setUserInfo } from '../store/user'; import { useTranslation } from '@i18next-toolkit/react'; import { createFileRoute, useNavigate } from '@tanstack/react-router'; diff --git a/src/server/ws/index.ts b/src/server/ws/index.ts index b0552bb..bc2643a 100644 --- a/src/server/ws/index.ts +++ b/src/server/ws/index.ts @@ -26,6 +26,7 @@ export function initSocketio(httpServer: HTTPServer) { try { const token = socket.handshake.auth['token']; let user: UserAuthPayload; + if (token) { user = jwtVerify(token); } else {