摘要: export const SearchPanel = ({ users, param, setParam }: SearchPanelProps) => { return ( <Form style={{ marginBottom: "2rem" }} layout={"inline"}> <For 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(30) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(13) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(30) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(10) 评论(0) 推荐(0)
摘要: // TS 中的typeof,是在静态环境运行的 // return (...[endpoint, config]: Parameters<typeof http>) => export const useHttp = () => { const { user } = useAuth(); // u 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(16) 评论(0) 推荐(0)
摘要: const apiUrl = process.env.REACT_APP_API_URL; interface Config extends RequestInit { token?: string; data?: object; } export const http = async ( endp 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(14) 评论(0) 推荐(0)
摘要: import React, { useState } from "react"; import { RegisterScreen } from "unauthenticated-app/register"; import { LoginScreen } from "unauthenticated-a 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(13) 评论(0) 推荐(0)
摘要: const AuthContext = React.createContext< | { user: User | null; register: (form: AuthForm) => Promise<void>; login: (form: AuthForm) => Promise<void>; 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(17) 评论(0) 推荐(0)
摘要: const AuthContext = React.createContext< | { user: User | null; register: (form: AuthForm) => Promise<void>; login: (form: AuthForm) => Promise<void>; 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(16) 评论(0) 推荐(0)
摘要: // 在真实环境中,如果使用firebase这种第三方auth服务的话,本文件不需要开发者开发 import { User } from "types/user"; const apiUrl = process.env.REACT_APP_API_URL; const localStorageKey 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(16) 评论(0) 推荐(0)