添加登录和后端校验
完成后端设计(未在本仓库体现),通过安全的手段完成了登录鉴权
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { useContext } from 'react'
|
||||
import { ThemeContext } from '../context/ThemeContext'
|
||||
import type { ThemeMode } from '../utils/store'
|
||||
|
||||
export function useTheme(): [ThemeMode, (t: ThemeMode) => void] {
|
||||
const ctx = useContext(ThemeContext)
|
||||
return [ctx.theme, ctx.setTheme]
|
||||
}
|
||||
Reference in New Issue
Block a user