File tree Expand file tree Collapse file tree 4 files changed +11
-20
lines changed Expand file tree Collapse file tree 4 files changed +11
-20
lines changed Original file line number Diff line number Diff line change 1
- import { type NextRequest , NextResponse } from "next/server"
1
+ import { NextResponse } from "next/server"
2
2
3
- export async function GET ( request : NextRequest ) {
3
+ export async function GET ( ) {
4
4
try {
5
5
// 确保环境变量存在,否则使用硬编码的值(仅用于开发)
6
6
const clientId = process . env . GITEE_CLIENT_ID || "5e96ca868817fa1b190d14e20ffd7b19f03f2c9aa6c064dda3bfe9e715ee8dd2"
@@ -14,12 +14,12 @@ export async function GET(request: NextRequest) {
14
14
// 构建 Gitee 授权 URL
15
15
const authUrl = `https://gitee.com/oauth/authorize?client_id=${ clientId } &redirect_uri=${ redirectUri } &response_type=code`
16
16
17
- console . log ( "重定向到: " , authUrl )
17
+ console . log ( "重定向到: " , authUrl )
18
18
19
19
// 重定向到 Gitee 授权页面
20
20
return NextResponse . redirect ( authUrl )
21
21
} catch ( error ) {
22
- console . error ( "Gitee 登录路由错误: " , error )
22
+ console . error ( "Gitee 登录路由错误: " , error )
23
23
24
24
// 返回错误响应而不是重定向
25
25
return new NextResponse (
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ function Calendar({
54
54
...classNames ,
55
55
} }
56
56
components = { {
57
- IconLeft : ( { ... props } ) => < ChevronLeft className = "h-4 w-4" /> ,
58
- IconRight : ( { ... props } ) => < ChevronRight className = "h-4 w-4" /> ,
57
+ IconLeft : ( ) => < ChevronLeft className = "h-4 w-4" /> ,
58
+ IconRight : ( ) => < ChevronRight className = "h-4 w-4" /> ,
59
59
} }
60
60
{ ...props }
61
61
/>
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ ChartContainer.displayName = "Chart"
69
69
70
70
const ChartStyle = ( { id, config } : { id : string ; config : ChartConfig } ) => {
71
71
const colorConfig = Object . entries ( config ) . filter (
72
- ( [ _ , config ] ) => config . theme || config . color
72
+ ( [ , config ] ) => config . theme || config . color
73
73
)
74
74
75
75
if ( ! colorConfig . length ) {
Original file line number Diff line number Diff line change @@ -15,37 +15,28 @@ type ToasterToast = ToastProps & {
15
15
action ?: ToastActionElement
16
16
}
17
17
18
- const actionTypes = {
19
- ADD_TOAST : "ADD_TOAST" ,
20
- UPDATE_TOAST : "UPDATE_TOAST" ,
21
- DISMISS_TOAST : "DISMISS_TOAST" ,
22
- REMOVE_TOAST : "REMOVE_TOAST" ,
23
- } as const
24
-
25
18
let count = 0
26
19
27
20
function genId ( ) {
28
21
count = ( count + 1 ) % Number . MAX_VALUE
29
22
return count . toString ( )
30
23
}
31
24
32
- type ActionType = typeof actionTypes
33
-
34
25
type Action =
35
26
| {
36
- type : ActionType [ "ADD_TOAST" ]
27
+ type : "ADD_TOAST"
37
28
toast : ToasterToast
38
29
}
39
30
| {
40
- type : ActionType [ "UPDATE_TOAST" ]
31
+ type : "UPDATE_TOAST"
41
32
toast : Partial < ToasterToast >
42
33
}
43
34
| {
44
- type : ActionType [ "DISMISS_TOAST" ]
35
+ type : "DISMISS_TOAST"
45
36
toastId ?: string
46
37
}
47
38
| {
48
- type : ActionType [ "REMOVE_TOAST" ]
39
+ type : "REMOVE_TOAST"
49
40
toastId ?: string
50
41
}
51
42
You can’t perform that action at this time.
0 commit comments