mirror of
https://github.com/SECTL/SecScore.git
synced 2026-07-21 18:19:03 +08:00
chore: 完成项目多维度优化与功能迭代
本次提交包含多项改进: 1. 新增Vitest测试配置与相关测试用例 2. 完善Deep Link监听与OAuth回调支持 3. 修复并优化多个React组件的依赖与性能 4. 更新后端API域名与端点地址 5. 优化KV存储服务实现与类型定义 6. 调整用户信息展示与权限相关逻辑 7. 重构部分业务逻辑,使用useCallback优化性能 8. 更新依赖包与Cargo.lock依赖版本
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useState, useEffect } from "react"
|
||||
import { useState, useEffect, useMemo } from "react"
|
||||
|
||||
export type Breakpoint = "xs" | "sm" | "md" | "lg" | "xl" | "xxl"
|
||||
|
||||
@@ -22,7 +22,10 @@ const defaultBreakpoints: Breakpoints = {
|
||||
|
||||
export function useResponsive(customBreakpoints?: Partial<Breakpoints>): Breakpoint {
|
||||
const [breakpoint, setBreakpoint] = useState<Breakpoint>("lg")
|
||||
const breakpoints = { ...defaultBreakpoints, ...customBreakpoints }
|
||||
const breakpoints = useMemo(
|
||||
() => ({ ...defaultBreakpoints, ...customBreakpoints }),
|
||||
[customBreakpoints]
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
const updateBreakpoint = () => {
|
||||
|
||||
Reference in New Issue
Block a user