- 将获取 STS Token 的接口地址由 paopao-api 改为 guilixu-api - 更新图片上传接口地址为新的 guilixu-api 域名 - 修改用户推广页面中邀请码链接和二维码接口的域名 - 更改注册页微信登录接口请求的域名为 guilixu-api
16 lines
322 B
TypeScript
16 lines
322 B
TypeScript
import { createContext, useContext } from 'react'
|
|
|
|
export interface AppContextType {
|
|
theme: 'light' | 'dark'
|
|
toggleTheme: () => void
|
|
}
|
|
|
|
const AppContext = createContext<AppContextType>({
|
|
theme: 'light',
|
|
toggleTheme: () => {}
|
|
})
|
|
|
|
export const useAppContext = () => useContext(AppContext)
|
|
|
|
export default AppContext
|