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"
22
3- export async function GET ( request : NextRequest ) {
3+ export async function GET ( ) {
44 try {
55 // 确保环境变量存在,否则使用硬编码的值(仅用于开发)
66 const clientId = process . env . GITEE_CLIENT_ID || "5e96ca868817fa1b190d14e20ffd7b19f03f2c9aa6c064dda3bfe9e715ee8dd2"
@@ -14,12 +14,12 @@ export async function GET(request: NextRequest) {
1414 // 构建 Gitee 授权 URL
1515 const authUrl = `https://gitee.com/oauth/authorize?client_id=${ clientId } &redirect_uri=${ redirectUri } &response_type=code`
1616
17- console . log ( "重定向到: " , authUrl )
17+ console . log ( "重定向到: " , authUrl )
1818
1919 // 重定向到 Gitee 授权页面
2020 return NextResponse . redirect ( authUrl )
2121 } catch ( error ) {
22- console . error ( "Gitee 登录路由错误: " , error )
22+ console . error ( "Gitee 登录路由错误: " , error )
2323
2424 // 返回错误响应而不是重定向
2525 return new NextResponse (
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ function Calendar({
5454 ...classNames ,
5555 } }
5656 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" /> ,
5959 } }
6060 { ...props }
6161 />
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ ChartContainer.displayName = "Chart"
6969
7070const ChartStyle = ( { id, config } : { id : string ; config : ChartConfig } ) => {
7171 const colorConfig = Object . entries ( config ) . filter (
72- ( [ _ , config ] ) => config . theme || config . color
72+ ( [ , config ] ) => config . theme || config . color
7373 )
7474
7575 if ( ! colorConfig . length ) {
Original file line number Diff line number Diff line change @@ -15,37 +15,28 @@ type ToasterToast = ToastProps & {
1515 action ?: ToastActionElement
1616}
1717
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-
2518let count = 0
2619
2720function genId ( ) {
2821 count = ( count + 1 ) % Number . MAX_VALUE
2922 return count . toString ( )
3023}
3124
32- type ActionType = typeof actionTypes
33-
3425type Action =
3526 | {
36- type : ActionType [ "ADD_TOAST" ]
27+ type : "ADD_TOAST"
3728 toast : ToasterToast
3829 }
3930 | {
40- type : ActionType [ "UPDATE_TOAST" ]
31+ type : "UPDATE_TOAST"
4132 toast : Partial < ToasterToast >
4233 }
4334 | {
44- type : ActionType [ "DISMISS_TOAST" ]
35+ type : "DISMISS_TOAST"
4536 toastId ?: string
4637 }
4738 | {
48- type : ActionType [ "REMOVE_TOAST" ]
39+ type : "REMOVE_TOAST"
4940 toastId ?: string
5041 }
5142
You can’t perform that action at this time.
0 commit comments